gcc/testsuite/g++.dg/lookup/suggestions1.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | namespace N { namespace M { int foo; } } // { dg-message "'N::M::foo' declared here" } |
| 4 | int f (void) { return N::foo; } // { dg-error "'foo' is not a member of 'N'; did you mean 'N::M::foo'\\?" } |
| 5 | |
| 6 | int g (void) { return ::foo; } // { dg-error "'::foo' has not been declared; did you mean 'N::M::foo'\\?" } |