diff --git a/include/nlohmann/detail/input/parser.hpp b/include/nlohmann/detail/input/parser.hpp index dfa80ff1c..f6a4a3ea9 100644 --- a/include/nlohmann/detail/input/parser.hpp +++ b/include/nlohmann/detail/input/parser.hpp @@ -56,7 +56,7 @@ using parser_callback_t = This class implements a recursive descent parser. */ -template +template class parser { using number_integer_t = typename BasicJsonType::number_integer_t; @@ -181,7 +181,8 @@ class parser { // stack to remember the hierarchy of structured values we are parsing // true = array; false = object - std::vector states; + std::vector states; + // value to avoid a goto (see comment where set to true) bool skip_to_state_evaluation = false; diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 504117bf1..62c8c123a 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -105,7 +105,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec // can be restored when json_pointer backwards compatibility is removed // friend ::nlohmann::json_pointer; - template + template friend class ::nlohmann::detail::parser; friend ::nlohmann::detail::serializer; template @@ -129,14 +129,14 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec using lexer = ::nlohmann::detail::lexer_base; template - static ::nlohmann::detail::parser, AllocatorType> parser( + static ::nlohmann::detail::parser, AllocatorType, AllocatorType> parser( InputAdapterType adapter, detail::parser_callback_tcb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false ) { - return ::nlohmann::detail::parser, AllocatorType>(std::move(adapter), + return ::nlohmann::detail::parser, AllocatorType, AllocatorType>(std::move(adapter), std::move(cb), allow_exceptions, ignore_comments); } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 5a3812841..992a75d70 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -12160,7 +12160,7 @@ using parser_callback_t = This class implements a recursive descent parser. */ -template +template class parser { using number_integer_t = typename BasicJsonType::number_integer_t; @@ -12285,7 +12285,8 @@ class parser { // stack to remember the hierarchy of structured values we are parsing // true = array; false = object - std::vector states; + std::vector states; + // value to avoid a goto (see comment where set to true) bool skip_to_state_evaluation = false; @@ -19326,7 +19327,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec // can be restored when json_pointer backwards compatibility is removed // friend ::nlohmann::json_pointer; - template + template friend class ::nlohmann::detail::parser; friend ::nlohmann::detail::serializer; template @@ -19350,14 +19351,14 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec using lexer = ::nlohmann::detail::lexer_base; template - static ::nlohmann::detail::parser, AllocatorType> parser( + static ::nlohmann::detail::parser, AllocatorType, AllocatorType> parser( InputAdapterType adapter, detail::parser_callback_tcb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false ) { - return ::nlohmann::detail::parser, AllocatorType>(std::move(adapter), + return ::nlohmann::detail::parser, AllocatorType, AllocatorType>(std::move(adapter), std::move(cb), allow_exceptions, ignore_comments); }