tbaederr wrote:
I don't understand this:
```c++
void test9(void) {
constexpr int i1 = a2;
constexpr int i2 = (int){a2};
constexpr int k = (constexpr int){a2};
}
```
Why would `i1` be rejected, but `i2` be accepted? I get that we're reading a
const variable into a non-const, non-constexpr compound literal, but we're
still in a constant expression and we're still initializing a constexpr
variable, so why is the read from `a2` okay?
https://github.com/llvm/llvm-project/pull/212559
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits