diff options
Diffstat (limited to 'bitfield.h')
-rw-r--r-- | bitfield.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -11,7 +11,8 @@ namespace impl { */ template <typename ValueType> static constexpr bool is_bitfield_type_v = - std::is_integral<ValueType>::value && std::is_unsigned<ValueType>::value && + std::is_integral<ValueType>::value && // NOLINT(misc-redundant-expression) + std::is_unsigned<ValueType>::value && // NOLINT(misc-redundant-expression) !std::is_same<ValueType, bool>::value; /** @@ -56,7 +57,8 @@ struct field_ref { constexpr field_ref& operator=(ValueType val) { m_val &= ~kMask; - return operator|=(val); + operator|=(val); + return *this; } constexpr field_ref& operator|=(ValueType val) { @@ -121,6 +123,7 @@ struct bitfield { } #define OPERATOR(OP) \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ constexpr bitfield<ValueType>& operator OP(ValueType val) { \ m_val OP val; \ return *this; \ |