mirror of
https://github.com/nlohmann/json.git
synced 2026-10-09 16:07:14 +00:00
Use the with_object_t alias for the custom object key test types
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
2 files changed
+6
-6
No files matched your search
@@ -71,5 +71,5 @@ class object
|
||||
using base_type::base_type;
|
||||
};
|
||||
|
||||
using json = nlohmann::basic_json<object>;
|
||||
using json = nlohmann::json::with_object_t<object>;
|
||||
} // namespace custom_object_key_test
|
||||
@@ -156,11 +156,11 @@ struct object_for
|
||||
using type = std::map<K, Value, std::less<K>, pair_allocator<Key, Value, Compare, Allocator>>; // NOLINT(modernize-use-transparent-functors)
|
||||
};
|
||||
|
||||
using json_full = nlohmann::basic_json<object_for<key_full>::type>;
|
||||
using json_no_eq = nlohmann::basic_json<object_for<key_no_eq>::type>;
|
||||
using json_explicit = nlohmann::basic_json<object_for<key_explicit>::type>;
|
||||
using json_to_json = nlohmann::basic_json<object_for<key_to_json>::type>;
|
||||
using json_c_str = nlohmann::basic_json<object_for<key_c_str>::type>;
|
||||
using json_full = nlohmann::json::with_object_t<object_for<key_full>::type>;
|
||||
using json_no_eq = nlohmann::json::with_object_t<object_for<key_no_eq>::type>;
|
||||
using json_explicit = nlohmann::json::with_object_t<object_for<key_explicit>::type>;
|
||||
using json_to_json = nlohmann::json::with_object_t<object_for<key_to_json>::type>;
|
||||
using json_c_str = nlohmann::json::with_object_t<object_for<key_c_str>::type>;
|
||||
|
||||
// a key that is long enough to need a length byte in CBOR and MessagePack
|
||||
const char* long_key_name(std::size_t i, std::string& storage);
|
||||
|
||||
Reference in new issue
Block a user