From: Gabe Black Date: Mon, 8 Jan 2018 03:56:25 +0000 (-0800) Subject: base: Hide the BitUnion::__StorageType type. X-Git-Tag: v19.0.0.0~2365 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1ade08b2da4a0b398b69ea4eb2de35b08941826;p=gem5.git base: Hide the BitUnion::__StorageType type. Since this type is now accessible through a clean interface, hide it from anybody that tries to peak around the curtain. Change-Id: I1257b6675a45b8648be459ad8e8d0f27a6feee6b Reviewed-on: https://gem5-review.googlesource.com/7205 Reviewed-by: Gabe Black Maintainer: Gabe Black --- diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh index 10fa00508..6e7d223d2 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