mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-09 23:34:23 +00:00
update example
This commit is contained in:
parent
26f225b71f
commit
122aa8028d
1 changed files with 4 additions and 2 deletions
|
|
@ -53,13 +53,15 @@ int main() {
|
|||
std::cout << " " << magic_enum::enum_to_string(e).value();
|
||||
}
|
||||
std::cout << std::endl;
|
||||
// Color sequence: RED BLUE GREEN
|
||||
|
||||
constexpr auto colors_name = magic_enum::enum_to_string_sequence<Color>();
|
||||
constexpr auto color_names = magic_enum::enum_to_string_sequence<Color>();
|
||||
std::cout << "Color sequence:";
|
||||
for (auto e : colors_name) {
|
||||
for (auto e : color_names) {
|
||||
std::cout << " " << e;
|
||||
}
|
||||
std::cout << std::endl;
|
||||
// Color sequence: RED BLUE GREEN
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue