AaronBallman wrote:

> But what's the reason for the initialize being rejected? I assume it's simply 
> not allowed to read from a non-constexpr variable in C23 if we're in a 
> constant context (e.g. initializing a constexpr variable)? In that case, 
> shouldn't the evaluation of the initializer fail?

Correct, you cannot initialize a `constexpr` variable from a non-`constexpr` 
initializer.

Btw, this is a continuation of https://github.com/llvm/llvm-project/pull/228776 

https://github.com/llvm/llvm-project/pull/232825
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to