// RUN: %clang_cc1 -std=c++20 -verify %s template struct S { template struct N { N(T) {} N(T, U) {} template N(V, U) {} }; }; S::N x{"a", 1}; using T = decltype(x); using T = S::N; template struct default_ftd_argument { template struct B { template B(Y); }; }; default_ftd_argument::B default_arg("a"); using DefaultArg = decltype(default_arg); using DefaultArg = default_ftd_argument::B; template struct test; template struct non_type_param { template struct B { B(Y); template = 0> B(Z); }; }; non_type_param::B ntp = 5; using NonTypeParam = decltype(ntp); using NonTypeParam = non_type_param::B; template concept True = true; template concept False = false; template struct concepts { template struct B { template Z> B(Y, Z); }; }; concepts::B cc(1, 3); using Concepts = decltype(cc); using Concepts = concepts::B; template struct requires_clause { template struct B { template requires true B(Y, Z); }; }; requires_clause::B req(1, 2); using RC = decltype(req); using RC = requires_clause::B; template struct nested_init_list { template Y> struct B { X x; Y y; }; template struct concept_fail { // #INIT_LIST_INNER_INVALID X x; F f; }; }; nested_init_list::B nil {1, 2}; using NIL = decltype(nil); using NIL = nested_init_list::B; // expected-error@+1 {{no viable constructor or deduction guide for deduction of template arguments of 'concept_fail'}} nested_init_list::concept_fail nil_invalid{1, ""}; // expected-note@#INIT_LIST_INNER_INVALID {{candidate template ignored: substitution failure [with F = const char *]: constraints not satisfied for class template 'concept_fail' [with F = const char *]}} // expected-note@#INIT_LIST_INNER_INVALID {{candidate function template not viable: requires 1 argument, but 2 were provided}} // expected-note@#INIT_LIST_INNER_INVALID {{candidate function template not viable: requires 0 arguments, but 2 were provided}}