summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/typename25.C
blob: aa1d109022fe90c211020ff18022f4f382692462 (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  }
// { dg-options "" }
// Copyright (C) 2000 Free Software Foundation
// Adapted by Nathan Sidwell 1 July 2000 <nathan@codesourcery.com>
// Derived from a bug report by scott snyder <snyder@fnal.gov>
// Our implicit typename extension was causing this pedantically
// correct program to fail

struct list
{
  typedef int reference;
};

class d0_Collection_Base {};


template <class T>
class d0_List_1
  : virtual public d0_Collection_Base,
    public list
{
public:
  typedef int reference;
};

template <class T>
class d0_List
{
public:
  typedef d0_List_1<T> Base;
  typedef typename Base::reference              reference;
};