aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/typedef23.C
blob: e70355037f734b66248c37a6cb2f763f69e51ed2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR c++/42069
// { dg-do compile }

struct A
{
  static const int N = 0;
};

template<int> struct B {};

template<typename T, int>
struct C
{
  typedef T U;
  B<U::N> b;
};

template<typename T>
struct C<T*, 0>
{
  B<T::N> b;
};

C<A*, 0> c;