Skip to content
Snippets Groups Projects
Commit 5fd06284 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Added missing hash specialization for std::pair

parent b5ed3f15
No related branches found
No related tags found
2 merge requests!318[Upd] release verision 0.5.0,!272[Add] Possibility to create a GenericOperator from any Operator
Pipeline #60828 failed
......@@ -445,6 +445,17 @@ namespace std {
return seed;
}
};
// Specialization of std::hash for std::pair<T1, T2>
template <typename T1, typename T2>
struct hash<std::pair<T1, T2>> {
std::size_t operator()(const std::pair<T1, T2>& p) const {
std::size_t seed = 0;
Aidge::hash_combine(seed, std::hash<T1>()(p.first));
Aidge::hash_combine(seed, std::hash<T2>()(p.second));
return seed;
}
};
}
namespace future_std {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment