-
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;
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>}
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?
I am using release v3.7.3 from https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent
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
developbranch?I am using release v3.7.3 from https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent
All unit tests passed