Closed
Description
Description
While calling .value<size_t>
, the code requests instantiation of json_pointer<size_t>
which leads to compilation error, because of ambiguity between /=(string_t) and /=(size_t).
Reproduction steps
https://godbolt.org/z/WYKW7hYeY
Expected vs. actual results
Code must compiles, as in 3.10.5.
Minimal code example
#include <nlohmann/json.hpp>
int main()
{
nlohmann::json().value<size_t>("key", 0);
}
Error messages
No response
Compiler and operating system
archlinux, gcc-12.1
Library version
3.11.1
Validation
- The bug also occurs if the latest version from the
develop
branch is used. - I can successfully compile and run the unit tests.