FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / using1.C
blob3857d701af2db545c71b116f6cc59060ad4f8d52
1 // Copyright (C) 2001, 2002 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 26 Feb 2001 <nathan@codesourcery.com>
4 // Bug 1981. using declarations in namespace scope were not remembered.
6 namespace A
8   void swap () {}
11 template <class T> void f()
13   using A::swap;
16 template void f<float> ();
18 int foo (int) { return 0;}
20 namespace B
22   int foo (int) { return 1;}
23   
24   template <class T> int baz ()
25   {
26     using ::foo;
27     
28     return foo (1);
29   }
30   template int baz<float> ();
33 int main ()
35   return B::baz<float> ();