diff --git a/include/nlohmann/json_fwd.hpp b/include/nlohmann/json_fwd.hpp index 32bde590f8..f9ff44369b 100644 --- a/include/nlohmann/json_fwd.hpp +++ b/include/nlohmann/json_fwd.hpp @@ -10,9 +10,11 @@ #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ #include // int64_t, uint64_t +#include // less #include // map #include // allocator #include // string +#include // pair #include // vector #include @@ -63,13 +65,14 @@ using json = basic_json<>; /// @brief a minimal map-like container that preserves insertion order /// @sa https://json.nlohmann.me/api/ordered_map/ -template -struct ordered_map; +template, + class Allocator = std::allocator>> + struct ordered_map; -/// @brief specialization that maintains the insertion order of object keys -/// @sa https://json.nlohmann.me/api/ordered_json/ -using ordered_json = basic_json; + /// @brief specialization that maintains the insertion order of object keys + /// @sa https://json.nlohmann.me/api/ordered_json/ + using ordered_json = basic_json; -NLOHMANN_JSON_NAMESPACE_END + NLOHMANN_JSON_NAMESPACE_END #endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 09fffb3bd1..83b1d93f71 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -3403,9 +3403,11 @@ NLOHMANN_JSON_NAMESPACE_END #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ #include // int64_t, uint64_t + #include // less #include // map #include // allocator #include // string + #include // pair #include // vector // #include @@ -3457,7 +3459,8 @@ NLOHMANN_JSON_NAMESPACE_END /// @brief a minimal map-like container that preserves insertion order /// @sa https://json.nlohmann.me/api/ordered_map/ - template + template, + class Allocator = std::allocator>> struct ordered_map; /// @brief specialization that maintains the insertion order of object keys diff --git a/single_include/nlohmann/json_fwd.hpp b/single_include/nlohmann/json_fwd.hpp index 29a6036d79..61578a3024 100644 --- a/single_include/nlohmann/json_fwd.hpp +++ b/single_include/nlohmann/json_fwd.hpp @@ -10,9 +10,11 @@ #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ #include // int64_t, uint64_t +#include // less #include // map #include // allocator #include // string +#include // pair #include // vector // #include @@ -164,13 +166,14 @@ using json = basic_json<>; /// @brief a minimal map-like container that preserves insertion order /// @sa https://json.nlohmann.me/api/ordered_map/ -template -struct ordered_map; +template, + class Allocator = std::allocator>> + struct ordered_map; -/// @brief specialization that maintains the insertion order of object keys -/// @sa https://json.nlohmann.me/api/ordered_json/ -using ordered_json = basic_json; + /// @brief specialization that maintains the insertion order of object keys + /// @sa https://json.nlohmann.me/api/ordered_json/ + using ordered_json = basic_json; -NLOHMANN_JSON_NAMESPACE_END + NLOHMANN_JSON_NAMESPACE_END #endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_