aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/class-deduction39.C
blob: 772434aee716f9f3688402c80a9708d4ba402529 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-do compile { target c++17 } }

template <class T> struct A { };

A<int> a;
const A c = a;
volatile A v = a;
const volatile A cv = a;

template <class,class> struct same;
template <class T> struct same<T,T> {};

same<decltype(c), const A<int>> s1;
same<decltype(v), volatile A<int>> s2;
same<decltype(cv), const volatile A<int>> s3;