3 ms·
I meant bitwise operations of enum values and not the values themselves of course. The type of x in your example is int.
by account42 2y ago
I meant bitwise operations of enum values and not the values themselves of course. The type of x in your example is int.
- gpderetta 2y agoAh! I meant to write decltype(x). And indeed you are right, it is int. TIL. I had checked on godblot, but of course the typo misled me. In retrospect it makes sense, there is no operator| for enum, it is just calling the int version after implicit conversion.