gcc/testsuite/g++.dg/lookup/using18.C
raw| 1 | // Copyright (C) 2007 Free Software Foundation |
| 2 | // Contributed by Ollie Wild <[email protected]> |
| 3 | // { dg-do compile } |
| 4 | |
| 5 | namespace N1 { |
| 6 | void f (); |
| 7 | struct f; // { dg-message "" "candidate" } |
| 8 | } |
| 9 | |
| 10 | namespace N2 { |
| 11 | void f (int); |
| 12 | struct f; // { dg-message "" "candidate" } |
| 13 | } |
| 14 | |
| 15 | namespace M { |
| 16 | using namespace N1; |
| 17 | using namespace N2; |
| 18 | } |
| 19 | |
| 20 | using M::f; // { dg-error "ambiguous" } |