Closed jcpunk closed 6 months ago
I think the deal here is if you have a more recent version of that library then there is an additional enum value. There is a PR that fixed it, but I rolled it back because the version in the third_party was older and didn't have it.
"that library" being json.hpp
Since the build is configured to turn on ~all the warnings, IMHO it would be nice to do something about this. Some options:
¯\_(ツ)_/¯
binary
. This creates the reverse problem that people using a system-provided json library must have a version recent enough to have this enum value. It looks like this was added to nlohmann json in 2019: https://github.com/nlohmann/json/pull/1662 and released in v3.8.0, as of June 2020. For reference, Debian Buster (current supported LTS version) appears to have json v3.5.0: https://packages.debian.org/buster/nlohmann-json3-dev (the next version, Bullseye, has v3.9.1).#if
logic in the switch statement to define a case for value_t::binary only if we're using a json lib version >= 3.8. I would prefer not to do this.default
case and raise an error. This should be both forward and backward compatible.
Just making sure someone saw this warning