2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / using1.C
blob8147b2b7c00c84e3e1a9194612e20bb94cdcf449
1 // { dg-do run  }
2 // Copyright (C) 2001, 2002 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 26 Feb 2001 <nathan@codesourcery.com>
5 // Bug 1981. using declarations in namespace scope were not remembered.
7 namespace A
9   void swap () {}
12 template <class T> void f()
14   using A::swap;
17 template void f<float> ();
19 int foo (int) { return 0;}
21 namespace B
23   int foo (int) { return 1;}
24   
25   template <class T> int baz ()
26   {
27     using ::foo;
28     
29     return foo (1);
30   }
31   template int baz<float> ();
34 int main ()
36   return B::baz<float> ();