diff options
Diffstat (limited to '')
| -rw-r--r-- | src/common/bit_field.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/common/bit_field.h b/src/common/bit_field.h index bd9e21e1e..639efe22d 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h | |||
| @@ -112,12 +112,6 @@ | |||
| 112 | template <std::size_t Position, std::size_t Bits, typename T, typename EndianTag = LETag> | 112 | template <std::size_t Position, std::size_t Bits, typename T, typename EndianTag = LETag> |
| 113 | struct BitField { | 113 | struct BitField { |
| 114 | private: | 114 | private: |
| 115 | // We hide the copy assigment operator here, because the default copy | ||
| 116 | // assignment would copy the full storage value, rather than just the bits | ||
| 117 | // relevant to this particular bit field. | ||
| 118 | // We don't delete it because we want BitField to be trivially copyable. | ||
| 119 | constexpr BitField& operator=(const BitField&) = default; | ||
| 120 | |||
| 121 | // UnderlyingType is T for non-enum types and the underlying type of T if | 115 | // UnderlyingType is T for non-enum types and the underlying type of T if |
| 122 | // T is an enumeration. Note that T is wrapped within an enable_if in the | 116 | // T is an enumeration. Note that T is wrapped within an enable_if in the |
| 123 | // former case to workaround compile errors which arise when using | 117 | // former case to workaround compile errors which arise when using |
| @@ -131,6 +125,8 @@ private: | |||
| 131 | using StorageTypeWithEndian = typename AddEndian<StorageType, EndianTag>::type; | 125 | using StorageTypeWithEndian = typename AddEndian<StorageType, EndianTag>::type; |
| 132 | 126 | ||
| 133 | public: | 127 | public: |
| 128 | BitField& operator=(const BitField&) = default; | ||
| 129 | |||
| 134 | /// Constants to allow limited introspection of fields if needed | 130 | /// Constants to allow limited introspection of fields if needed |
| 135 | static constexpr std::size_t position = Position; | 131 | static constexpr std::size_t position = Position; |
| 136 | static constexpr std::size_t bits = Bits; | 132 | static constexpr std::size_t bits = Bits; |