In boost 1.57 the + and - operations are no longer overloaded on the iterator
constants by default causing the following error:
.../include/valijson/validation_visitor.hpp:930:76:
error: no match for ‘operator-’ (operand types are ‘const const_iterator {aka const valijson::adapters::RapidJsonArrayValueIterator}’ and ‘int’)
const typename AdapterType::Array::const_iterator secondLast = end - 1;
The ++ operator is still valid, so here we rework in terms of it.
In boost 1.56 the optional library is no longer happy with the implicit
conversion from boost::optional<std::string> to bool, so we get the following
errors:
valijson/include/valijson/schema.hpp:177:16: error: no viable conversion from 'const boost::optional<std::string>' to 'bool'
return id;
^~
valijson/include/valijson/schema.hpp:188:16: error: no viable conversion from 'const boost::optional<std::string>' to 'bool'
return title;
^~~~~
2 errors generated.
Here we explicitly test against boost::none instead.
This commit contains the third major design of a C++ library for JSON Schema validation.
It is definitely not what I would consider production-ready, but I do think that the overall design of the library is robust.