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
e55d4cea83
commit
8fd0ddb13c
2 changed files with 15 additions and 15 deletions
|
|
@ -64,7 +64,7 @@ int main() {
|
|||
std::cout << "RED = " << c4_integer << std::endl; // RED = -10
|
||||
|
||||
using namespace magic_enum::ostream_operators; // out-of-the-box ostream operator for all enums.
|
||||
// ostream operator for enum.
|
||||
// Ostream operator for enum.
|
||||
std::cout << "Color: " << c1 << " " << c2 << " " << c3 << std::endl; // Color: RED BLUE GREEN
|
||||
|
||||
// Number of enum values.
|
||||
|
|
@ -77,7 +77,7 @@ int main() {
|
|||
constexpr auto& values = magic_enum::enum_values<Color>();
|
||||
std::cout << "Colors values:";
|
||||
for (const auto& c : values) {
|
||||
std::cout << " " << c; // ostream operator for enum.
|
||||
std::cout << " " << c; // Ostream operator for enum.
|
||||
}
|
||||
std::cout << std::endl;
|
||||
// Color sequence: RED BLUE GREEN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue