PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / template / using2.C
blob5987254d432f7d43d82ebe9858a94475d2e87408
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;
13 struct Baz 
15   int i;
18 template <class T>
19 struct Bar : public Foo<T>, Baz
21   using Foo<T>::i; // { dg-message "previous declaration" }
22   using Baz::i; // { dg-error "redeclaration" }
24   int foo () { return i; }
27 void foo (Bar<int> &bar)
29   bar.foo();