1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00
This commit is contained in:
terik23 2019-04-05 20:53:42 +05:00
parent 48e70234b5
commit 0ac07739f6
3 changed files with 106 additions and 80 deletions

View file

@ -47,5 +47,19 @@ int main() {
std::cout << c3_name.value() << std::endl; // BLUE
}
constexpr auto colors = magic_enum::enum_sequence<Color>();
std::cout << "Color sequence:";
for (auto e : colors) {
std::cout << " " << magic_enum::enum_to_string(e).value();
}
std::cout << std::endl;
constexpr auto colors_name = magic_enum::enum_to_string_sequence<Color>();
std::cout << "Color sequence:";
for (auto e : colors_name) {
std::cout << " " << e;
}
std::cout << std::endl;
return 0;
}