Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.dg / template / using3.C
blob11f2899c592b6a39c505a8829fd7dc529002f8bc
1 // { dg-do run }
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 (int) {return 1;}
13 struct Baz 
15   int k (int) {return 2;}
18 template <class T>
19 struct Bar : public Foo<T> , Baz {
20   using Foo<T>::i;
21   using Baz::k;
23   int i (float) {return 3;}
24   int k (float) {return 3;}
25   
26   int foo()
27   {
28     if (i (1) != 1)
29       return 1;
30     if (k (1) != 2)
31       return 2;
33     return 0;
34   }
37 int main()
39   Bar<int> bar;
41   return bar.foo();