From 289b96e56181b0cb1b643d9cf9621d355d8eb1d1 Mon Sep 17 00:00:00 2001 From: neargye Date: Sun, 29 Sep 2019 16:22:58 +0500 Subject: [PATCH] update example --- example/example.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/example.cpp b/example/example.cpp index 2562adf..d345972 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -33,7 +33,7 @@ int main() { std::cout << c1_name << std::endl; // RED // String enum name sequence. - constexpr auto color_names = magic_enum::enum_names(); + constexpr auto& color_names = magic_enum::enum_names(); std::cout << "Color names:"; for (auto n : color_names) { std::cout << " " << n; @@ -70,7 +70,7 @@ int main() { std::cout << "Color[0] = " << magic_enum::enum_value(0) << std::endl; // Color[0] = RED // Enum value sequence. - constexpr auto colors = magic_enum::enum_values(); + constexpr auto& colors = magic_enum::enum_values(); std::cout << "Colors sequence:"; for (Color c : colors) { std::cout << " " << c; // ostream operator for enum.