r/cpp • u/meetingcpp Meeting C++ | C++ Evangelist • Jul 19 '26
A better bitset for enum flags
https://www.elbeno.com/blog/?p=1836
43
Upvotes
r/cpp • u/meetingcpp Meeting C++ | C++ Evangelist • Jul 19 '26
View all comments
Show parent comment
5
u/_Noreturn Jul 19 '26 edited Jul 19 '26
you could use c++17 reflection libraries like magic_enum or enchantum they both provide a bitset type and an array type. so you don't have to wait for c++26
No but that's a nice idea i just use multiple expressions.
It is just a stupid wrapper like this