// Testcase from P1816R0 // { dg-do compile { target c++20 } } template struct S { T x; T y; }; S s = { 1, 2 }; template struct C { S s; T t; }; template struct D { S s; T t; }; C c1 = {1, 2}; // { dg-error "" "deduction failed" } C c2 = {1, 2, 3}; // { dg-error "" "deduction failed" } C c3 = {{1u, 2u}, 3}; // { dg-bogus "" "OK, C deduced" } D d1 = {1, 2}; // { dg-error "" "deduction failed" } D d2 = {1, 2, 3}; // { dg-bogus "" "OK, braces elided, D deduced" } template struct I { using type = T; }; template struct E { typename I::type i; T t; }; E e1 = {1, 2}; // { dg-bogus "" "OK, E deduced" }