|
| MSTL_NODISCARD MSTL_CONSTEXPR14 T | operator& (const T &other) const noexcept(noexcept(const_cast< T & >(derived()).operator&=(other))) |
| | 按位与运算符
|
| MSTL_NODISCARD MSTL_CONSTEXPR14 T | operator| (const T &other) const noexcept(noexcept(const_cast< T & >(derived()).operator|=(other))) |
| | 按位或运算符
|
| MSTL_NODISCARD MSTL_CONSTEXPR14 T | operator^ (const T &other) const noexcept(noexcept(const_cast< T & >(derived()).operator^=(other))) |
| | 按位异或运算符
|
| MSTL_NODISCARD MSTL_CONSTEXPR14 T | operator~ () const noexcept(noexcept(derived().operator~())) |
| | 按位取反运算符
|
| MSTL_NODISCARD MSTL_CONSTEXPR14 T | operator<< (const uint32_t shift) const |
| | 左移运算符
|
| MSTL_NODISCARD MSTL_CONSTEXPR14 T | operator>> (const uint32_t shift) const |
| | 右移运算符
|
| MSTL_CONSTEXPR14 T & | operator&= (const T &other) noexcept(noexcept(derived().operator&=(other))) |
| | 按位与赋值运算符
|
| MSTL_CONSTEXPR14 T & | operator|= (const T &other) noexcept(noexcept(derived().operator|=(other))) |
| | 按位或赋值运算符
|
| MSTL_CONSTEXPR14 T & | operator^= (const T &other) noexcept(noexcept(derived().operator^=(other))) |
| | 按位异或赋值运算符
|
| MSTL_CONSTEXPR14 T & | operator<<= (const uint32_t shift) |
| | 左移赋值运算符
|
| MSTL_CONSTEXPR14 T & | operator>>= (const uint32_t shift) |
| | 右移赋值运算符
|
template<typename T>
struct ibinary< T >
位运算接口基类
- 模板参数
-
使用CRTP模式为派生类提供位运算运算符的通用实现。 派生类只需实现复合赋值运算符,即可自动获得相应的二元运算符。
在文件 inumeric.hpp 第 217 行定义.