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-06 18:35:09 +05:00
parent 122aa8028d
commit 5a3d4b53e6
5 changed files with 105 additions and 70 deletions

View file

@ -47,8 +47,8 @@ int main() {
std::cout << c3_name.value() << std::endl; // BLUE
}
constexpr auto colors = magic_enum::enum_sequence<Color>();
std::cout << "Color sequence:";
constexpr auto colors = magic_enum::enum_to_sequence<Color>();
std::cout << "Colors:";
for (auto e : colors) {
std::cout << " " << magic_enum::enum_to_string(e).value();
}
@ -56,7 +56,7 @@ int main() {
// Color sequence: RED BLUE GREEN
constexpr auto color_names = magic_enum::enum_to_string_sequence<Color>();
std::cout << "Color sequence:";
std::cout << "Color names:";
for (auto e : color_names) {
std::cout << " " << e;
}