summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C
blob: c0495233af81e661aa7af05978e3856d03bf11ad (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
40
// { dg-do assemble  }
// { dg-options "" }
// Origin: philippeb@videotron.ca

#include <iostream>

using namespace std;

template <class T> struct traits
{
  typedef long next;
};


template <class T>
struct c1
{
  template <class U>
  struct c2
  {
    c2()
    {
      cout << __PRETTY_FUNCTION__ << endl;
    }
  };
};


template <class T>
void foo()
{
  cout << __PRETTY_FUNCTION__ << endl;
  typename c1<typename traits<T>::next>::template c2<void>();
}


int main()
{
  foo<int>();
}