Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 5 years ago

Language

C++

Compiler

clang HEAD 11.0.0 (https://github.com/llvm/llvm-project.git 54928ba0ec8355edbbdb31c7b01bb45eb2d384b6)

Options
Warnings
Boost 1.72.0
C++2a(GNU)
no pedantic

Author

anonymous

about 5 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.72.0/clang-head/include -std=gnu++2a
prog.cc:16:7: error: reference to 'N1' is ambiguous
using N1::f;
      ^
prog.cc:1:11: note: candidate found by name lookup is 'N1'
namespace N1 {
          ^
prog.cc:8:10: note: candidate found by name lookup is 'N2::N1'
  struct N1 {
         ^
prog.cc:21:20: error: use of undeclared identifier 'f'; did you mean 'N1::f'?
    printf("%s\n", f());
                   ^
                   N1::f
prog.cc:2:16: note: 'N1::f' declared here
   const char* f() {
               ^
2 errors generated.
Exit Code:
1