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.99k stars 445 forks source link

add contains and any_flag_match functions for flags #253

Closed jonpetri closed 1 year ago

jonpetri commented 1 year ago

Issue #253 @Neargye In the end here is a proposal for another function too, the difference being how the no-flag case is addressed. I can drop the 2nd commit if you prefer so.

I have also added the "none" flag to the flags in the example, as this is a common and handy usage with flags.