diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-03-19 14:28:19 +0000 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-03-19 14:28:19 +0000 |
commit | 277ded3de765bb395868799e8d739aa5b286a7e3 (patch) | |
tree | e52baae5b3ce15c85f210c851a8d9eace2feb4ff /src | |
parent | 898652fe045ec6e4f76db8875478f29db58a0f14 (diff) | |
download | gem5-277ded3de765bb395868799e8d739aa5b286a7e3.tar.xz |
For the _BitfieldRO and _BitfieldWO classes, make sure the undesired operator is redefined as private.
--HG--
extra : convert_revision : b18d8e49547c2712ab255d048850c5231313b80a
Diffstat (limited to 'src')
-rw-r--r-- | src/base/bitfield.hh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/base/bitfield.hh b/src/base/bitfield.hh index da7a21b8f..408882a51 100644 --- a/src/base/bitfield.hh +++ b/src/base/bitfield.hh @@ -171,10 +171,14 @@ namespace BitfieldBackend //A class which specializes a given base so that it can only be read //from. This is accomplished by only passing through the conversion - //operator. + //operator and explicitly making sure the assignment operator is blocked. template<class Type, class Base> class _BitfieldRO : public Base { + private: + const Type + operator=(const Type & _data); + public: operator const Type () { @@ -186,6 +190,9 @@ namespace BitfieldBackend template<class Type, class Base> class _BitfieldWO : public Base { + private: + operator const Type (); + public: const Type operator=(const Type & _data) { |