Skip to content

Commit 5ff90d9

Browse files
authored
fix diagnostic positions related compilation errors (#4570)
1 parent 6be4e85 commit 5ff90d9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/nlohmann/json.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
849849
detail::is_basic_json<BasicJsonType>::value&& !std::is_same<basic_json, BasicJsonType>::value, int > = 0 >
850850
basic_json(const BasicJsonType& val)
851851
#if JSON_DIAGNOSTIC_POSITIONS
852-
: start_position(val.start_position),
853-
end_position(val.end_position)
852+
: start_position(val.start_pos()),
853+
end_position(val.end_pos())
854854
#endif
855855
{
856856
using other_boolean_t = typename BasicJsonType::boolean_t;

single_include/nlohmann/json.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20704,8 +20704,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
2070420704
detail::is_basic_json<BasicJsonType>::value&& !std::is_same<basic_json, BasicJsonType>::value, int > = 0 >
2070520705
basic_json(const BasicJsonType& val)
2070620706
#if JSON_DIAGNOSTIC_POSITIONS
20707-
: start_position(val.start_position),
20708-
end_position(val.end_position)
20707+
: start_position(val.start_pos()),
20708+
end_position(val.end_pos())
2070920709
#endif
2071020710
{
2071120711
using other_boolean_t = typename BasicJsonType::boolean_t;

0 commit comments

Comments
 (0)