aboutsummaryrefslogtreecommitdiff
path: root/bitfield.h
diff options
context:
space:
mode:
Diffstat (limited to 'bitfield.h')
-rw-r--r--bitfield.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitfield.h b/bitfield.h
index a49a997..be7eed8 100644
--- a/bitfield.h
+++ b/bitfield.h
@@ -20,7 +20,7 @@ static constexpr bool is_bitfield_type_v =
/// compute_mask<4, 7, uint32_t>() -> 0xf0
template <std::uint8_t LowBit, std::uint8_t HighBit, typename ValueType>
static constexpr inline ValueType compute_mask() {
- using unsigned_t = typename std::make_unsigned<ValueType>::type;
+ using unsigned_t = std::make_unsigned_t<ValueType>;
constexpr unsigned_t kMaxBits = sizeof(unsigned_t) * 8;
static_assert(HighBit < kMaxBits, "HighBit exceeds bits of ValueType");
@@ -67,7 +67,7 @@ struct field_ref {
private:
ValueType& m_val;
- enum : ValueType {
+ enum : ValueType { // NOLINT(performance-enum-size)
kMask = impl::compute_mask<LowBit, HighBit, ValueType>(),
};
};
@@ -89,7 +89,7 @@ struct const_field_ref {
private:
const ValueType& m_val;
- enum : ValueType {
+ enum : ValueType { // NOLINT(performance-enum-size)
kMask = impl::compute_mask<LowBit, HighBit, ValueType>(),
};
};