32template <
typename BaseT,
typename T,
typename = std::enable_if_t<std::is_arithmetic_v<T>>>
62 friend constexpr bool operator==(
const BaseT lhs,
const BaseT rhs)
noexcept
64 return lhs.mValue == rhs.mValue;
85 template <
typename = std::enable_if_t<std::is_
integral_v<T>>>
99 template <
typename = std::enable_if_t<std::is_
integral_v<T>>>
131 return static_cast<BaseT &
>(*this);
140 return static_cast<const BaseT &
>(*this);
156template <
typename BaseT,
typename T,
typename = std::enable_if_t<std::is_
integral_v<T>>>
172template <
typename BaseT,
typename T,
typename = std::enable_if_t<std::is_
integral_v<T>>>
175 return BaseT{T(l) | T(r)};
188template <
typename BaseT,
typename T,
typename = std::enable_if_t<std::is_
integral_v<T>>>
191 return BaseT{T(l) & T(r)};
constexpr BaseT operator~(IntrinsicType< BaseT, T > t) noexcept
Performs bitwise NOT operation on an IntrinsicType.
constexpr BaseT operator&(IntrinsicType< BaseT, T > l, IntrinsicType< BaseT, T > r) noexcept
Performs bitwise AND operation between two IntrinsicType objects.
constexpr BaseT operator|(IntrinsicType< BaseT, T > l, IntrinsicType< BaseT, T > r) noexcept
Performs bitwise OR operation between two IntrinsicType objects.
CRTP type designed to allow creation of strong types based on intrinsics.
BaseT & operator=(BaseT arg) noexcept
Assignment operator from BaseT.
constexpr BaseT & operator&=(BaseT arg) noexcept
Bitwise AND assignment operator.
BaseT & CrtpBase() noexcept
Helper function to perform CRTP cast.
constexpr IntrinsicType(value_type v=value_type()) noexcept
Constructs an IntrinsicType object.
friend constexpr bool operator==(const BaseT lhs, const BaseT rhs) noexcept
Equality operator - class friend.
constexpr BaseT & operator|=(BaseT arg) noexcept
Bitwise OR assignment operator.
const BaseT & CrtpBase() const noexcept
Const version of helper function to perform CRTP cast.
constexpr value_type get() const noexcept
Getter for the underlying value.
BaseT & operator=(value_type v)
Assignment operator from value_type.