aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/class-deduction50.C
blob: 7289932c486a8ea8e914ae6566d839cf137a7749 (plain)
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-do compile { target 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;