1// { dg-do run } 2// Copyright (C) 2001, 2002 Free Software Foundation, Inc. 3// Contributed by Nathan Sidwell 26 Feb 2001 <nathan@codesourcery.com> 4 5// Bug 1981. using declarations in namespace scope were not remembered. 6 7namespace A 8{ 9 void swap () {} 10} 11 12template <class T> void f() 13{ 14 using A::swap; 15} 16 17template void f<float> (); 18 19int foo (int) { return 0;} 20 21namespace B 22{ 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> (); 32} 33 34int main () 35{ 36 return B::baz<float> (); 37} 38