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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [using2.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// { dg-do compile }
2
 
3
// Copyright (C) 2003 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 22 Jul 2003 
5
 
6
// PR 9447. Using decls in template classes.
7
 
8
template 
9
struct Foo {
10
  int i; // { dg-error "" "" }
11
};
12
 
13
struct Baz
14
{
15
  int i; // { dg-error "" "" }
16
};
17
 
18
template 
19
struct Bar : public Foo, Baz {
20
  using Foo::i;
21
  using Baz::i;
22
 
23
  int foo () { return i; } // { dg-error "request for member" "" }
24
};
25
 
26
void foo (Bar &bar)
27
{
28
  bar.foo(); // { dg-error "instantiated" "" }
29
}
30
 

powered by: WebSVN 2.1.0

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