summaryrefslogtreecommitdiff
path: root/src/utils.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-12-16 18:57:19 +0000
committerMaxime Coste <frrrwww@gmail.com>2014-12-16 18:57:19 +0000
commitebecd60eb810246cfa682a1fbd72270aa9861f0b (patch)
tree0c5c707b68cb08fc93ace2433291deb8a52db5bc /src/utils.hh
parentdbd7bd41bbf39d1fd5736997122a4652c78ddc50 (diff)
Rework hashing, use a more extensible framework similar to n3876 proposal
std::hash specialization is a pain to work with, stop using that, and just specialize a 'size_t hash_value(const T&)' free function.
Diffstat (limited to 'src/utils.hh')
-rw-r--r--src/utils.hh17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/utils.hh b/src/utils.hh
index e4d392ff..c8e29f89 100644
--- a/src/utils.hh
+++ b/src/utils.hh
@@ -185,21 +185,4 @@ bool is_in_range(const T& val, const T& min, const T& max)
}
-// std::pair hashing
-namespace std
-{
-
-template<typename T1, typename T2>
-struct hash<std::pair<T1,T2>>
-{
- size_t operator()(const std::pair<T1,T2>& val) const
- {
- size_t seed = std::hash<T2>()(val.second);
- return seed ^ (std::hash<T1>()(val.first) + 0x9e3779b9 +
- (seed << 6) + (seed >> 2));
- }
-};
-
-}
-
#endif // utils_hh_INCLUDED