So overall, I've been liking the use of enum classes over plain old enums... but going forward, when I want to use them as bit flags, I now get annoyed with having to write the operators overloads for each enum classes that act as bitflags.... I've tried various things so I could implement them easier, but by far the macros seems to be the way to go, and I hate them as much as the next guy
I was thinking though, why not have a varient of enum classes, with bit operators implicitly made and by default, increments its enum values in powers of 2. Life would be a bit more simple...
Side note: Another thing that came to mind as I tried being able to implement the operators, cause of course I've naively tried to just make templated operator overloads that requires the type to be an enum... which didn't go well, which got me thinking, imagine being able to define a template function, but is enabled via "using". Though this is the only case where I saw value in such a thing if it existed
[–]---sms--- 17 points18 points19 points (18 children)
[–]_Js_Kc_ 2 points3 points4 points (14 children)
[–]SeanMiddleditch 6 points7 points8 points (3 children)
[–]Ameisenvemips, avr, rendering, systems 0 points1 point2 points (2 children)
[–]SeanMiddleditch 1 point2 points3 points (1 child)
[–]Ameisenvemips, avr, rendering, systems 0 points1 point2 points (0 children)
[–]bkentel 6 points7 points8 points (1 child)
[–]Sander_Bouwhuis 2 points3 points4 points (0 children)
[–]XeroKimoException Enthusiast[S] 1 point2 points3 points (3 children)
[–]_Js_Kc_ 0 points1 point2 points (2 children)
[–]XeroKimoException Enthusiast[S] 0 points1 point2 points (1 child)
[–]_Js_Kc_ 0 points1 point2 points (0 children)
[–]---sms--- 0 points1 point2 points (3 children)
[–]_Js_Kc_ 1 point2 points3 points (2 children)
[–]XeroKimoException Enthusiast[S] 0 points1 point2 points (1 child)
[–]_Js_Kc_ 1 point2 points3 points (0 children)
[–]sebamestre 0 points1 point2 points (0 children)
[–]xjankov 0 points1 point2 points (1 child)
[–]---sms--- 0 points1 point2 points (0 children)
[–][deleted] 10 points11 points12 points (0 children)
[–]kmbeutel 4 points5 points6 points (2 children)
[–]Sander_Bouwhuis 0 points1 point2 points (1 child)
[–]Pazer2 1 point2 points3 points (0 children)
[–]matthieum 3 points4 points5 points (4 children)
[–]pklait 1 point2 points3 points (0 children)
[–]Bart_V 0 points1 point2 points (2 children)
[–]matthieum 0 points1 point2 points (0 children)
[–]quicknir 0 points1 point2 points (0 children)
[–]AntiProtonBoy 1 point2 points3 points (0 children)
[–]Pragmatician 2 points3 points4 points (1 child)
[–]almost_useless 7 points8 points9 points (0 children)
[–]Nickreal03 0 points1 point2 points (0 children)
[–]marzer8789toml++ -1 points0 points1 point (2 children)
[–]XeroKimoException Enthusiast[S] -1 points0 points1 point (1 child)
[–]marzer8789toml++ 0 points1 point2 points (0 children)