From 5ff90d9e02a55424287bd39465a1b2d018d2b376 Mon Sep 17 00:00:00 2001 From: Harinath Nampally Date: Sat, 28 Dec 2024 10:22:45 -0500 Subject: [PATCH] fix diagnostic positions related compilation errors (#4570) --- include/nlohmann/json.hpp | 4 ++-- single_include/nlohmann/json.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 7234177a0..c391faf8c 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -849,8 +849,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec detail::is_basic_json::value&& !std::is_same::value, int > = 0 > basic_json(const BasicJsonType& val) #if JSON_DIAGNOSTIC_POSITIONS - : start_position(val.start_position), - end_position(val.end_position) + : start_position(val.start_pos()), + end_position(val.end_pos()) #endif { using other_boolean_t = typename BasicJsonType::boolean_t; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index a13dd22fd..0be903ff4 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -20704,8 +20704,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec detail::is_basic_json::value&& !std::is_same::value, int > = 0 > basic_json(const BasicJsonType& val) #if JSON_DIAGNOSTIC_POSITIONS - : start_position(val.start_position), - end_position(val.end_position) + : start_position(val.start_pos()), + end_position(val.end_pos()) #endif { using other_boolean_t = typename BasicJsonType::boolean_t;