Language
C++
Compiler
gcc HEAD 10.0.0 20190519 (experimental)
Options
Warnings
Boost 1.68.0
C++17
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=c++17
Exit Code:
1
Author
anonymous
about 6 years ago
C++
gcc HEAD 10.0.0 20190519 (experimental)
Author
anonymous
about 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=c++17
prog.cc: In member function 'void bar::Tester::do_test()':
prog.cc:33:51: error: call of overloaded 'get_string(foo::My_enum)' is ambiguous
33 | auto result = get_string(foo::My_enum::foo);
| ^
prog.cc:20:17: note: candidate: 'std::string bar::get_string(foo::My_enum)'
20 | std::string get_string(foo::My_enum string_name)
| ^~~~~~~~~~
prog.cc:11:26: note: candidate: 'const unsigned char* foo::get_string(foo::My_enum)'
11 | const unsigned char *get_string(My_enum name)
| ^~~~~~~~~~