summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/nontype-auto5.C
blob: 323a89632a9e1ae208f98e8ec7461761941ac985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-options -std=c++17 }

template <class T> struct A
{
  template <auto v>    struct Y;
  template <auto* p>   struct Y<p> { using type1 = decltype (p); };
  template <auto** pp> struct Y<pp> { using type2 = decltype (pp); };
};

int i;
int *p;

A<void>::Y<&i>::type1 t1;
A<void>::Y<&p>::type2 t2;