OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [scope2.C] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do compile }
2
 
3
// Copyright (C) 2003 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 15 Aug 2003 
5
 
6
// checked instantiated bases in wrong scope.
7
 
8
class Helper {};
9
 
10
template struct X { };
11
 
12
template class Base
13
{
14
  protected:
15
  typedef Helper H;
16
};
17
 
18
template
19
struct Derived : Base
20
{
21
  typedef Base Parent;
22
  typedef typename Parent::H H;
23
 
24
  class Nested : public X {};
25
 
26
  Nested m;
27
 
28
  void Foo ();
29
};
30
 
31
void Foo (Derived &x)
32
{
33
  x.Foo ();
34
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.