summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memclass9.C
blob: 0795d69bf1b8aee442276180bf4e700c32b9a0ee (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
// { dg-do assemble  }

template <class T>
struct S1
{
  template <class U>
  struct S2
  { 
    S2(U);

    void g() 
      {
	S2<U> s2u (u);
      }

    U& u;
  };

  template <class U>
  void f(U u)
    {
      S2<U> s2u(u);
      s2u.g();
    }
};

void g()
{
  S1<int> s1;
  s1.f(3.0);
}