В письме от вторник, 17 марта 2026 г. 08:36:05 MSK пользователь Julien Blanc via Boost написал:
I've come to the conclusion that any representation of enum flags with C++ enums is a design mistake by itself (a pretty widespread one, but still a mistake). Enums are individual values, enum flags are a set of values, they are different by nature. In C++, different things deserve a different type, call it an enum_bitset, an enum_set or whatever, but donc make it a plain enum / enum class.
I had the same thoughts when I wrote my take on this (it's in the list of "Other flags-like implementations" in this proposed library's docs). So, naturally I agree. And yes, having a dedicated type makes usage much more ergonomic. But on the other hand, a lot of people consider having a dedicated type for flags/bitmasks a completely unnecessary overhead. I think these 2 groups will not find an agreement.