#include<string>
#include<memory>
constexpr bool b = [] {
std::string s[1];
std::construct_at(s, " ");
return true;
}();
https://godbolt.org/z/jdx7oGnMn
MSVC-trunk rejects it with:
<source>(4): error C2131: expression did not evaluate to a constant
<source>(6): note: a non-constant (sub-)expression was encountered
I don't know if this is a language bug or a library bug, please correct me if I'm missing something.
https://godbolt.org/z/jdx7oGnMn
MSVC-trunk rejects it with:
I don't know if this is a language bug or a library bug, please correct me if I'm missing something.