I have a verbatim copy of adl_serializer for boost::optional from the documentation. Version 2.1.1 of the library.
nlohmann::json json{{"test", nullptr}};
boost::optional<int> works = json["test"];
boost::optional<int> broken;
broken = json["test"];
Assignment to 'broken' variable won't go through the adl_serializer and will throw std::domain_error: type must be number, but is null
I have a verbatim copy of adl_serializer for boost::optional from the documentation. Version 2.1.1 of the library.
Assignment to 'broken' variable won't go through the adl_serializer and will throw std::domain_error: type must be number, but is null