Language
C++
Compiler
gcc 7.3.0
Options
Warnings
Boost 1.73.0
C++17(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-7.3.0/include -std=gnu++17
Exit Code:
1
Author
anonymous
almost 4 years ago
C++
gcc 7.3.0
Author
anonymous
almost 4 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-7.3.0/include -std=gnu++17
prog.cc: In function 'int main()':
prog.cc:33:29: error: call of overloaded 'Person(const char [4])' is ambiguous
Person p2 = Person("hhh");
^
prog.cc:13:5: note: candidate: Person::Person(std::__cxx11::string, double)
Person(string n = "", double a = 0.0) {
^~~~~~
prog.cc:11:5: note: candidate: Person::Person(std::__cxx11::string)
Person(string _name):name(_name) {}
^~~~~~