diff --git a/include/nlohmann/ordered_map.hpp b/include/nlohmann/ordered_map.hpp index a6e006e6..4a71951d 100644 --- a/include/nlohmann/ordered_map.hpp +++ b/include/nlohmann/ordered_map.hpp @@ -11,12 +11,12 @@ namespace nlohmann /// ordered_map: a minimal map-like container that preserves insertion order /// for use within nlohmann::basic_json template , - class Allocator = std::allocator>, - class Container = std::vector, Allocator>> -struct ordered_map : Container + class Allocator = std::allocator>> +struct ordered_map : std::vector, Allocator> { using key_type = Key; using mapped_type = T; + using Container = std::vector, Allocator>; using typename Container::iterator; using typename Container::size_type; using typename Container::value_type; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 50e173e2..e5e3bc3e 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -2773,7 +2773,7 @@ uses the standard template types. */ using json = basic_json<>; -template +template struct ordered_map; /*! @@ -15880,12 +15880,12 @@ namespace nlohmann /// ordered_map: a minimal map-like container that preserves insertion order /// for use within nlohmann::basic_json template , - class Allocator = std::allocator>, - class Container = std::vector, Allocator>> -struct ordered_map : Container + class Allocator = std::allocator>> +struct ordered_map : std::vector, Allocator> { using key_type = Key; using mapped_type = T; + using Container = std::vector, Allocator>; using typename Container::iterator; using typename Container::size_type; using typename Container::value_type; @@ -16063,7 +16063,7 @@ class basic_json InputAdapterType adapter, detail::parser_callback_tcb = nullptr, bool allow_exceptions = true - ) + ) { return ::nlohmann::detail::parser(std::move(adapter), std::move(cb), allow_exceptions); } @@ -24534,7 +24534,7 @@ template<> inline void swap(nlohmann::json& j1, nlohmann::json& j2) noexcept( is_nothrow_move_constructible::value and is_nothrow_move_assignable::value -) + ) { j1.swap(j2); }