5#ifndef TETL_BIT_IS_BITMASK_TYPE_HPP
6#define TETL_BIT_IS_BITMASK_TYPE_HPP
21template <bitmask_type T>
22[[nodiscard]]
constexpr auto operator&(T x, T y) -> T
25 return T{
static_cast<type
>(
static_cast<type
>(x) &
static_cast<type
>(y))};
28template <bitmask_type T>
29[[nodiscard]]
constexpr auto operator|(T x, T y) -> T
32 return T{
static_cast<type
>(
static_cast<type
>(x) |
static_cast<type
>(y))};
35template <bitmask_type T>
36[[nodiscard]]
constexpr auto operator^(T x, T y) -> T
39 return T{
static_cast<type
>(
static_cast<type
>(x) ^
static_cast<type
>(y))};
42template <bitmask_type T>
46 return T{
static_cast<type
>(~static_cast<type>(x))};
49template <bitmask_type T>
55template <bitmask_type T>
61template <bitmask_type T>
Definition is_bitmask_type.hpp:19
typename underlying_type< T >::type underlying_type_t
Definition underlying_type.hpp:31
Definition adjacent_find.hpp:8
constexpr auto operator&=(T &x, T y) noexcept -> T const &
Definition is_bitmask_type.hpp:56
constexpr auto operator~(T x) -> T
Definition is_bitmask_type.hpp:43
constexpr auto operator|(T x, T y) -> T
Definition is_bitmask_type.hpp:29
constexpr auto operator^(T x, T y) -> T
Definition is_bitmask_type.hpp:36
constexpr auto operator&(T x, T y) -> T
Definition is_bitmask_type.hpp:22
constexpr auto operator^=(T &x, T y) noexcept -> T const &
Definition is_bitmask_type.hpp:62
bool_constant< false > false_type
Definition bool_constant.hpp:14
constexpr auto is_bitmask_type_v
Definition is_bitmask_type.hpp:16
constexpr auto operator|=(T &x, T y) noexcept -> T const &
Definition is_bitmask_type.hpp:50
static constexpr bool value
Definition integral_constant.hpp:10
Definition is_bitmask_type.hpp:13