Author
anonymous
almost 8 years ago
Language
C++
Compiler
gcc 5.4.0
Options
Warnings
Boost 1.63.0
C++1z(GNU)
no pedantic
Author
anonymous
almost 8 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.63.0/gcc-5.4.0/include -std=gnu++1z
prog.cc: In function 'int main()':
prog.cc:9:25: error: call of overloaded 'basic_string(json&)' is ambiguous
string s2 = (string)js ;
^
In file included from /opt/wandbox/gcc-5.4.0/include/c++/5.4.0/string:52:0,
from /opt/wandbox/gcc-5.4.0/include/c++/5.4.0/stdexcept:39,
from /opt/wandbox/gcc-5.4.0/include/c++/5.4.0/array:38,
from json.hpp:33,
from prog.cc:1:
/opt/wandbox/gcc-5.4.0/include/c++/5.4.0/bits/basic_string.h:476:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
basic_string(basic_string&& __str) noexcept
^
/opt/wandbox/gcc-5.4.0/include/c++/5.4.0/bits/basic_string.h:398:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
basic_string(const basic_string& __str)
^
/opt/wandbox/gcc-5.4.0/include/c++/5.4.0/bits/basic_string.h:390:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
basic_string(const _Alloc& __a)
^
Exit Code:
1