-1 is not -1 for different sizes of integers. Which exact -1 do you want? 32-bit? 64-bit? int-sized (as int is defined in current implementation)? With current approach it's simple, boolean type is expected to have 1-bit size (which is rounded to 8 bits if stored in memory).
Bool should be logically 1-bit, when stored in memory only least significant bit should be used and the rest is allowed to be garbage. Such approach gives compilers as much room for optimizations as possible. Forcing them writing some specific bit-pattern may lead to suboptimal code generation.
In any field of characteristic 2, every element is its own negative. So on the surface this makes sense, notwithstanding the unintuitive enum corner case behaviour
I wonder if [[=std::bitmask_type]] also enables compiler warnings that a switch statement is not exhaustive if it does not cover all possible flag combinations.
I thought attributes were reserved for compiler-specific semantics like calling conventions. Here they're just being used as stropping for a language feature with syntactic significance!
What expectations do you have of the value?
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p33...