1
0
Fork 0
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:
terik23 2019-04-06 18:16:29 +05:00
parent 26f225b71f
commit 122aa8028d

View file

@ -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;
}