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

Fix bitset constructor #367

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..