https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94983
--- Comment #3 from Andrey Vihrov ---
Another sample, probably caused by the same underlying issue:
struct T
{
char a[3];
};
void bar()
{
T t{"x"}; // OK
T{"x"}; // OK
new T{"x"}; // err
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94983
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94983
--- Comment #2 from Andrey Vihrov ---
Thanks for the helpful link.
To clarify, list initialization in a new-expression context behaves differently
from other cases such as "S{};" and "S s{};" (be their behavior correct or
incorrect).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94983
--- Comment #1 from Jonathan Wakely ---
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1008r1.pdf was the
C++20 change, and the appendix shows the messy history.