magic_enum::bitwise_operators
C++ API reference for the namespace magic_enum::bitwise_operators.
Public API
Free Function: operator&
Canonical path: magic_enum::bitwise_operators::operator&
Declared in: include/magic_enum/magic_enum.hpp
Signature
constexpr E operator&(E lhs, E rhs) noexcept;
Summary
Bitwise AND operator for enum types.
Behavior
Performs a bitwise AND operation by casting operands to their underlying types and casting the result back to E.
Parameters
- lhs: The left-hand side operand.
- rhs: The right-hand side operand.
Returns
- Return value 1: The result of the bitwise AND operation as type E.
Free Function: operator&=
Canonical path: magic_enum::bitwise_operators::operator&=
Declared in: include/magic_enum/magic_enum.hpp
Signature
constexpr E& operator&=(E& lhs, E rhs) noexcept;
Summary
Bitwise AND assignment operator for enum types.
Behavior
Assigns the result of a bitwise AND operation between lhs and rhs to lhs.
Parameters
- lhs: The left-hand side operand of type E&.
- rhs: The right-hand side operand of type E.
Returns
- Return value 1: A reference to the modified lhs.
Free Function: operator^
Canonical path: magic_enum::bitwise_operators::operator^
Declared in: include/magic_enum/magic_enum.hpp
Signature
constexpr E operator^(E lhs, E rhs) noexcept;
Summary
Bitwise XOR operator for enum types.
Behavior
Performs a bitwise XOR operation by casting operands to their underlying types and casting the result back to E.
Parameters
- lhs: The left-hand side operand.
- rhs: The right-hand side operand.
Returns
- Return value 1: The result of the bitwise XOR operation as type E.
Free Function: operator^=
Canonical path: magic_enum::bitwise_operators::operator^=
Declared in: include/magic_enum/magic_enum.hpp
Signature
constexpr E& operator^=(E& lhs, E rhs) noexcept;
Summary
Bitwise XOR assignment operator for enum types.
Behavior
Assigns the result of a bitwise XOR operation between lhs and rhs to lhs.
Parameters
- lhs: The left-hand side operand of type E&.
- rhs: The right-hand side operand of type E.
Returns
- Return value 1: A reference to the modified lhs.
Free Function: operator|
Canonical path: magic_enum::bitwise_operators::operator|
Declared in: include/magic_enum/magic_enum.hpp
Signature
constexpr E operator|(E lhs, E rhs) noexcept;
Summary
Bitwise OR operator for enum types.
Behavior
Performs a bitwise OR operation by casting operands to their underlying types and casting the result back to E.
Parameters
- lhs: The left-hand side operand.
- rhs: The right-hand side operand.
Returns
- Return value 1: The result of the bitwise OR operation as type E.
Free Function: operator|=
Canonical path: magic_enum::bitwise_operators::operator|=
Declared in: include/magic_enum/magic_enum.hpp
Signature
constexpr E& operator|=(E& lhs, E rhs) noexcept;
Summary
Bitwise OR assignment operator for enum types.
Behavior
Assigns the result of a bitwise OR operation between lhs and rhs to lhs.
Parameters
- lhs: The left-hand side operand of type E&.
- rhs: The right-hand side operand of type E.
Returns
- Return value 1: A reference to the modified lhs.
Free Function: operator~
Canonical path: magic_enum::bitwise_operators::operator~
Declared in: include/magic_enum/magic_enum.hpp
Signature
constexpr E operator~(E rhs) noexcept;
Summary
Bitwise NOT operator for enum types.
Behavior
Performs a bitwise NOT operation by casting the operand to its underlying type, applying the operator, and casting back to E.
Parameters
- rhs: The operand to be negated.
Returns
- Return value 1: The result of the bitwise NOT operation as type E.