You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the issue you have?
Tried to dump to an ostringstream as specified was possible in the documentation, but cannot compile because the compiler can't find a match for the overloaded operator.
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
json res = json::object();
std::ostringstream to;
to << res;
What is the expected behavior?
It should compile and dump to stream correctly.
And what is the actual behavior instead?
Compilation error.
error: no match for ‘operator<<’ (operand types are ‘std::ostringstream’ {aka ‘std::__cxx11::basic_ostringstream<char>’} and ‘json’ {aka ‘nlohmann::basic_json<>’})
136 | to << res;
| ~~ ^~ ~~~
| | |
| | json {aka nlohmann::basic_json<>}
| std::ostringstream {aka std::__cxx11::basic_ostringstream<char>}
Which compiler and operating system are you using? Is it a supported compiler?
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Did you use a released version of the library or the version from the develop branch?
What is the issue you have?
Tried to dump to an ostringstream as specified was possible in the documentation, but cannot compile because the compiler can't find a match for the overloaded operator.
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
What is the expected behavior?
It should compile and dump to stream correctly.
And what is the actual behavior instead?
Compilation error.
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
develop
branch?I am using release v3.7.3 from https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent
All unit tests passed
The text was updated successfully, but these errors were encountered: