diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/bit_field.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/common/bit_field.h b/src/common/bit_field.h index 7e1df62b1..368b7b98c 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h | |||
| @@ -127,11 +127,14 @@ public: | |||
| 127 | } | 127 | } |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | // This constructor and assignment operator might be considered ambiguous: | 130 | BitField(T val) { |
| 131 | // Would they initialize the storage or just the bitfield? | 131 | Assign(val); |
| 132 | // Hence, delete them. Use the Assign method to set bitfield values! | 132 | } |
| 133 | BitField(T val) = delete; | 133 | |
| 134 | BitField& operator=(T val) = delete; | 134 | BitField& operator=(T val) { |
| 135 | Assign(val); | ||
| 136 | return *this; | ||
| 137 | } | ||
| 135 | 138 | ||
| 136 | constexpr BitField() noexcept = default; | 139 | constexpr BitField() noexcept = default; |
| 137 | 140 | ||