Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr12.C

raw
1 // PR c++/101803
2 // { dg-do compile { target c++20 } }
3
4 struct Inner { int i = 0; };
5
6 template <typename T = void>
7 struct Outer { Inner s{}; };
8
9 Outer o1{ .s = {} }; // works
10 Outer o2{ .s = Inner{ .i = 1} }; // works
11 Outer o3{ .s = { .i = 1} }; // does not
12
13 Outer o4{ .s{} }; // works
14 Outer o5{ .s{Inner{ .i = 1} } }; // works
15 Outer o6{ .s{ .i = 1} }; // does not