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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [using2.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { 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;
11
};
12
 
13
struct Baz
14
{
15
  int i;
16
};
17
 
18
template 
19
struct Bar : public Foo, Baz
20
{
21
  using Foo::i; // { dg-message "previous declaration" }
22
  using Baz::i; // { dg-error "redeclaration" }
23
 
24
  int foo () { return i; }
25
};
26
 
27
void foo (Bar &bar)
28
{
29
  bar.foo();
30
}
31
 

powered by: WebSVN 2.1.0

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