What is the issue you have?
Code below is causing compilation error.
std::ifstream i(path);
ordered_json j;
i >> j;
(20462, 53) No viable conversion from 'typename basic_json<nlohmann::ordered_map, std::vector, basic_string, bool, long long, unsigned long long, double, std::allocator, adl_serializer, vector<unsigned char, allocator > >::object_t::iterator' (aka '__wrap_iter<std::__1::pair<const std::__1::basic_string, nlohmann::basic_json<nlohmann::ordered_map, std::vector, std::__1::basic_string, bool, long long, unsigned long long, double, std::allocator, adl_serializer, std::__1::vector<unsigned char, std::__1::allocator > > > *>') to 'const std::__1::basic_string'
Please describe the steps to reproduce the issue.
- Write the code above.
- Try build
- Boom!
Can you provide a small but working code example?
It's not working, but see above for the code.
What is the expected behavior?
Successfully built, and read the json file.
And what is the actual behavior instead?
Compile error
Which compiler and operating system are you using?
- Compiler: xcode
- Operating system: mac
Which version of the library did you use?
I can compile this project and pass all unit tests, but I don't think the tests cover this case.
What is the issue you have?
Code below is causing compilation error.
(20462, 53) No viable conversion from 'typename basic_json<nlohmann::ordered_map, std::vector, basic_string, bool, long long, unsigned long long, double, std::allocator, adl_serializer, vector<unsigned char, allocator > >::object_t::iterator' (aka '__wrap_iter<std::__1::pair<const std::__1::basic_string, nlohmann::basic_json<nlohmann::ordered_map, std::vector, std::__1::basic_string, bool, long long, unsigned long long, double, std::allocator, adl_serializer, std::__1::vector<unsigned char, std::__1::allocator > > > *>') to 'const std::__1::basic_string'
Please describe the steps to reproduce the issue.
Can you provide a small but working code example?
It's not working, but see above for the code.
What is the expected behavior?
Successfully built, and read the json file.
And what is the actual behavior instead?
Compile error
Which compiler and operating system are you using?
Which version of the library did you use?
developbranchIf you experience a compilation error: can you compile and run the unit tests?
I can compile this project and pass all unit tests, but I don't think the tests cover this case.