Daniil Goncharov

Results 123 comments of Daniil Goncharov

If you need to iterate over all values ​​then use `enum_for_each` `enum_switch` does not take a default value, it takes a value that will be handled in the switch

```cpp return magic_enum::enum_switch( overloaded{ []( my_enum::val1 arg ) -> int { /* handle val1 enum */ return 1; }, []( auto arg ) -> int { /* handle the rest...

@schaumb I like the option to make it consistent with the std::visit, so that there is a fallback for all possible enums or defaults. This is also consistent with the...

Sorry, I didn't quite understand the question.

It seems to me that such an opportunity would be better than anything, it will also be possible to easily expand other functions ```cpp enum class Color { RED =...

add ```cpp template constexpr string_view enum_name(optional value) noexcept; ``` it's allow wtire ```cpp auto color_name = magic_enum::enum_name(magic_enum::enum_cast(2)); // or auto color_name = magic_enum::enum_cast(2).and_then(magic_enum::enum_name); ```

Are we missing something the current api? Do we need containers? ```cpp struct enum_map { optional values[enum_cout()]; auto operator[](E v) if (const auto index = enum_index(v); index.has_value()) { return values[*index];...

FYI, hope [bitset will be constexpr soon ](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2417r1.pdf) Could you please make a PR, so it will be more convenient to check?

Oh, I haven't seen this library in boost yet, I'll take a look at it.