summaryrefslogtreecommitdiff
path: root/src/base/bitunion.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/bitunion.hh')
-rw-r--r--src/base/bitunion.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh
index 718a06838..10fa00508 100644
--- a/src/base/bitunion.hh
+++ b/src/base/bitunion.hh
@@ -388,4 +388,20 @@ namespace BitfieldBackend
template <typename T>
using BitUnionBaseType = typename BitfieldBackend::BitUnionBaseType<T>::Type;
+namespace std
+{
+ template <typename T>
+ struct hash;
+
+ template <typename T>
+ struct hash<BitUnionType<T> > : public hash<BitUnionBaseType<T> >
+ {
+ size_t
+ operator() (const BitUnionType<T> &val) const
+ {
+ return hash<BitUnionBaseType<T> >::operator()(val);
+ }
+ };
+}
+
#endif // __BASE_BITUNION_HH__