From c54607119d2c2061c002305d67603e1e5b2c4247 Mon Sep 17 00:00:00 2001 From: BohdanBuinich Date: Tue, 23 Apr 2024 01:08:04 +0300 Subject: [PATCH] Compatibility with boost-1.85.0 Starting from boost version 1.85.0, json::error_code is now deprecated Changes added here: https://github.com/boostorg/json/commit/bacc644f93c9b2000cd137ebf541ad754d6ca747 --- examples/boost_json_example.cpp | 2 +- include/valijson/utils/boost_json_utils.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/boost_json_example.cpp b/examples/boost_json_example.cpp index 3367f15..0947b92 100644 --- a/examples/boost_json_example.cpp +++ b/examples/boost_json_example.cpp @@ -45,7 +45,7 @@ const auto targetJson = R"({ int main() { - json::error_code ec; + boost::system::error_code ec; auto schemaDoc = json::parse(schemaJson, ec); if (ec) { std::cerr << "Error parsing schema json: " << ec.message() << std::endl; diff --git a/include/valijson/utils/boost_json_utils.hpp b/include/valijson/utils/boost_json_utils.hpp index 0fbd6c3..2cf3caf 100644 --- a/include/valijson/utils/boost_json_utils.hpp +++ b/include/valijson/utils/boost_json_utils.hpp @@ -23,7 +23,7 @@ inline bool loadDocument(const std::string &path, boost::json::value &document) #if VALIJSON_USE_EXCEPTIONS try { #endif - boost::json::error_code errorCode; + boost::system::error_code errorCode; boost::json::string_view stringView{file}; document = boost::json::parse(stringView, errorCode); if (errorCode) {