https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101344
Bug ID: 101344 Summary: braced-init-list not supported in an aggregate deduction Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- Please consider the program as follows. GCC correctly initializes struct A, but in more simple case of struct B it fails: ``` template<typename T, int N> struct A { T t[N]; }; template<typename T> struct B { T t[2]; }; int main() { A a{{1, 2}}; // ok in gcc B b{{1, 2}}; // error in gcc (ok in other compilers, e.g. msvc) return a.t[0]; } ``` I believe, struct B initialization shall work here same way.