diff --git a/example/enum_flag_example.cpp b/example/enum_flag_example.cpp index 80eea9b..8d552d6 100644 --- a/example/enum_flag_example.cpp +++ b/example/enum_flag_example.cpp @@ -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 diff --git a/include/magic_enum.hpp b/include/magic_enum.hpp index a0c377d..86b2a96 100644 --- a/include/magic_enum.hpp +++ b/include/magic_enum.hpp @@ -1086,6 +1086,12 @@ std::basic_ostream& operator<<(std::basic_ostream& o } // namespace magic_enum::flags::ostream_operators +namespace flags::bitwise_operators { + +using namespace magic_enum::bitwise_operators; + +} // namespace magic_enum::flags::bitwise_operators + } // namespace magic_enum #if defined(__clang__)