aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/canon-type-11.C
blob: 0fe99511e4caad438e5cb16a541c58a0de601a5f (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
30
31
32
33
34
35
36
37
38
39
// Contributed by Dodji Seketeli <dodji@redhat.com>
// { dg-do compile }

template<class T>
struct C
{
  void bar();
};

template<class T>
void
C<T>::bar()
{
}


template<class U,
	 template<class TT0_T0> class TT0 = C,
	 template<class TT1_T0> class TT1 = TT0>
struct S
{
  C<U> s;

  void foo(TT1<U>);

  void bar()
  {
    foo(s);
  }
};

template<class T,
	 template<class TT0_T0> class TT0,
	 template<class TT1_T0> class TT1>
void
S<T, TT0, TT1>::foo(TT1<T>)
{
  C<T> c;
}