mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
add namespace magic_enum:🎏:bitwise_operators
This commit is contained in:
parent
e8c57b0a2a
commit
4da4b75644
2 changed files with 7 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ int main() {
|
|||
std::cout << std::endl;
|
||||
// AnimalFlags sequence: HasClaws CanFly EatsFish Endangered
|
||||
|
||||
using namespace magic_enum::bitwise_operators; // out-of-the-box bitwise operators for all enums.
|
||||
using namespace magic_enum::flags::bitwise_operators; // out-of-the-box bitwise operators for all enums.
|
||||
// Support operators: ~, |, &, ^, |=, &=, ^=.
|
||||
AnimalFlags flag = AnimalFlags::HasClaws | AnimalFlags::CanFly;
|
||||
std::cout << flag << std::endl; // HasClaws|CanFly
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue