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.76k stars 422 forks source link

Fix bitset constructor #367

Closed asolwa closed 1 month ago

asolwa commented 1 month 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..