Neargye / magic_enum

Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code
MIT License
4.98k stars 444 forks source link

Construct bitset from string_view #366

Closed asolwa closed 4 months ago

asolwa commented 4 months ago

Hi,

It appears a bug has crept into the construction of the bitset. The set function is used, but it does not accept std::optional. The result of the 'enum_cast' function should be dereferenced before being passed to the set method.

https://github.com/Neargye/magic_enum/blob/664ee62c12570948b0e025d15b42d641fba8d54a/include/magic_enum/magic_enum_containers.hpp#L624

Fixed in: https://github.com/Neargye/magic_enum/pull/367

Neargye commented 4 months ago

Thanks for fix!