In the Microsoft ABI, some expressions containing references to variables
cannot be evaluated as a constant. These are expressions containing a
conditional, logical and/or, or comma operator with an operand that is a
variable name.
This is observable at the ABI level by whether the compiler would emit a
static initializer for such expressions where normally it would emit a
readonly constant data. See PR26210 for more details.
We should add this test case and decide what to do with it:
Currently, in your patch, this diagnostic will come out. MSVC compiles this to guarded, dynamic initialization, despite the constexpr. ;_;
David thinks we should just give the user the real deal constexpr behavior, even though it's ABI incompatible.