1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
// PR c++/84355 // { dg-additional-options -std=c++17 } template <class, class> struct same; template <class T> struct same<T,T> {}; template<typename T> struct A { template<class U> struct B { B(U); }; A() { B b(0); same<decltype(b),B<int>>{}; } }; struct C {}; A<C> a;