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;