Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 7 years ago

Language

C++

Compiler

gcc 8.3.0

Options
Warnings
Don't Use Boost
C++17
no pedantic
Raw compiler options
-I.

Author

anonymous

almost 7 years ago

nlohmann/json.hpp

$ g++ prog.cc -Wall -Wextra -std=c++17 -I.
prog.cc: In function 'int main()':
prog.cc:30:8: error: ambiguous overload for 'operator<<' (operand types are 'std::__cxx11::basic_stringstream<wchar_t>' and 'json' {aka 'nlohmann::basic_json<>'})
     ss << j;
     ~~~^~~~
In file included from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/istream:39,
                 from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/sstream:38,
                 from prog.cc:1:
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:166:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<wchar_t>]'
       operator<<(long __n)
       ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:170:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<wchar_t>]'
       operator<<(unsigned long __n)
       ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<wchar_t>]'
       operator<<(bool __n)
       ^~~~~~~~
In file included from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:693,
                 from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/istream:39,
                 from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/sstream:38,
                 from prog.cc:1:
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/bits/ostream.tcc:91:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]'
     basic_ostream<_CharT, _Traits>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/istream:39,
                 from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/sstream:38,
                 from prog.cc:1:
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:181:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<wchar_t>]'
       operator<<(unsigned short __n)
       ^~~~~~~~
In file included from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:693,
                 from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/istream:39,
                 from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/sstream:38,
                 from prog.cc:1:
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/bits/ostream.tcc:105:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]'
     basic_ostream<_CharT, _Traits>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/istream:39,
                 from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/sstream:38,
                 from prog.cc:1:
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:192:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<wchar_t>]'
       operator<<(unsigned int __n)
       ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:201:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<wchar_t>]'
       operator<<(long long __n)
       ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:205:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<wchar_t>]'
       operator<<(unsigned long long __n)
       ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:220:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<wchar_t>]'
       operator<<(double __f)
       ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:224:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<wchar_t>]'
       operator<<(float __f)
       ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ostream:232:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<wchar_t>]'
       operator<<(long double __f)
       ^~~~~~~~
In file included from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/bits/ios_base.h:46,
                 from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/ios:42,
                 from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/istream:38,
                 from /opt/wandbox/gcc-8.3.0/include/c++/8.3.0/sstream:38,
                 from prog.cc:1:
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/system_error:217:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]'
     operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
     ^~~~~~~~
In file included from ./nlohmann/json.hpp:1845,
                 from prog.cc:2:
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/iomanip:79:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Resetiosflags) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]'
     operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
     ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/iomanip:109:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setiosflags) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]'
     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
     ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/iomanip:143:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setbase) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]'
     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
     ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/iomanip:208:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setprecision) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]'
     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
     ^~~~~~~~
/opt/wandbox/gcc-8.3.0/include/c++/8.3.0/iomanip:238:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::_Setw) [with _CharT = wchar_t; _Traits = std::char_traits<wchar_t>]'
     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
     ^~~~~~~~
Exit Code:
1