aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/class-deduction50.C
blob: e8cdd8c710fa8a8b3e9e9cc34d95b7da7234e3b6 (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-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;