mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
update doc and example
This commit is contained in:
parent
6992f41db7
commit
aa465f7f37
5 changed files with 27 additions and 7 deletions
|
|
@ -64,7 +64,7 @@ int main() {
|
|||
auto f4_integer = magic_enum::enum_integer(AnimalFlags::HasClaws);
|
||||
std::cout << "HasClaws = " << f4_integer << std::endl; // HasClaws = 1024
|
||||
|
||||
using namespace magic_enum::ostream_operators; // out-of-the-box ostream operator for enum-flags.
|
||||
using magic_enum::iostream_operators::operator<<; // out-of-the-box ostream operator for enum-flags.
|
||||
// Ostream operator for enum-flags.
|
||||
std::cout << f1 << " " << f2 << " " << f3 << std::endl; // Endangered CanFly|EatsFish HasClaws|EatsFish
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue