diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh index 10fa005084..6e7d223d20 100644 --- a/src/base/bitunion.hh +++ b/src/base/bitunion.hh @@ -291,8 +291,14 @@ namespace BitfieldBackend class BitfieldUnderlyingClasses##name : \ public BitfieldBackend::BitfieldTypes \ { \ - public: \ + protected: \ typedef type __StorageType; \ + friend BitfieldBackend::BitUnionBaseType< \ + BitfieldBackend::BitUnionOperators< \ + BitfieldUnderlyingClasses##name> >; \ + friend BitfieldBackend::BitUnionBaseType< \ + BitfieldUnderlyingClasses##name>; \ + public: \ union { \ type __storage; @@ -388,6 +394,8 @@ namespace BitfieldBackend template using BitUnionBaseType = typename BitfieldBackend::BitUnionBaseType::Type; + +//An STL style hash structure for hashing BitUnions based on their base type. namespace std { template