aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/mem-partial3.C
blob: bea6cd39641149e1a699d1a3ff652ba933ec8faf (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
26
27
28
29
// PR c++/33342

template <bool B, class T = void>
struct enable_if_c {
  typedef T type;
};

template <class T>
struct A
{
  template <class U, class V>
  struct B;

  template <class U>
  struct B<U, typename enable_if_c<U::sub::value==0>::type>
  { };
};

struct C
{
  struct sub
  {
    static const int value = 0;
  };
};

    
A<int> a;
A<int>::B<C, void> b;