// PR c++/114903 // { dg-do compile { target c++20 } } template struct Key { Key(int); }; class Forward {}; template constexpr bool C = __is_same(T, Forward); template struct Outer { template struct Foo { Foo(U); U u; }; template requires(C) Foo(V) -> Foo; }; template struct T { template struct T2 { template using AFoo = Outer::template Foo; }; }; T::T2::AFoo a(1.0); using type = decltype(a); using type = Outer::Foo;