2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / template / using2.C
blob87cdbc1865712e926e8f1744cf959a4e4b379878
1 // { dg-do compile }
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 22 Jul 2003 <nathan@codesourcery.com>
6 // PR 9447. Using decls in template classes.
8 template <class T>
9 struct Foo {
10   int i; // { dg-error "" "" }
13 struct Baz 
15   int i; // { dg-error "" "" }
18 template <class T>
19 struct Bar : public Foo<T>, Baz {
20   using Foo<T>::i;
21   using Baz::i;
23   int foo () { return i; } // { dg-error "request for member" "" }
26 void foo (Bar<int> &bar)
28   bar.foo(); // { dg-error "instantiated" "" }