[Bug c++/94983] Empty list initialization of aggregate class with deleted default ctor rejected in C++14 and C++17
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"}; // error: could not convert '{"x"}' from // '' to 'T' }
[Bug c++/94983] Empty list initialization of aggregate class with deleted default ctor rejected in C++14 and C++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94983 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2020-05-09 Keywords||rejects-valid Ever confirmed|0 |1
[Bug c++/94983] Empty list initialization of aggregate class with deleted default ctor rejected in C++14 and C++17
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).
[Bug c++/94983] Empty list initialization of aggregate class with deleted default ctor rejected in C++14 and C++17
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.