Ignore allocator hardcoded to match std::map

This commit is contained in:
gatopeich 2020-06-22 00:03:48 +01:00
parent 27aaf6f845
commit 15337b2cc3
3 changed files with 6 additions and 4 deletions

View file

@ -496,6 +496,7 @@ class basic_json
using object_t = ObjectType<StringType, using object_t = ObjectType<StringType,
basic_json, basic_json,
object_comparator_t, object_comparator_t,
// TODO: AllocatorType<ObjectType::value_type>
AllocatorType<std::pair<const StringType, AllocatorType<std::pair<const StringType,
basic_json>>>; basic_json>>>;

View file

@ -11,8 +11,8 @@ namespace nlohmann
/// ordered_map: a minimal map-like container that preserves insertion order /// ordered_map: a minimal map-like container that preserves insertion order
/// for use within nlohmann::basic_json<ordered_map> /// for use within nlohmann::basic_json<ordered_map>
template <class Key, class T, class IgnoredLess = std::less<Key>, template <class Key, class T, class IgnoredLess = std::less<Key>,
class Allocator = std::allocator<std::pair<Key, T>>, class IgnoredAllocator = std::allocator<std::pair<Key, T>>,
class Container = std::vector<std::pair<Key, T>, Allocator>> class Container = std::vector<std::pair<Key, T>>>
struct ordered_map : Container struct ordered_map : Container
{ {
using key_type = Key; using key_type = Key;

View file

@ -15880,8 +15880,8 @@ namespace nlohmann
/// ordered_map: a minimal map-like container that preserves insertion order /// ordered_map: a minimal map-like container that preserves insertion order
/// for use within nlohmann::basic_json<ordered_map> /// for use within nlohmann::basic_json<ordered_map>
template <class Key, class T, class IgnoredLess = std::less<Key>, template <class Key, class T, class IgnoredLess = std::less<Key>,
class Allocator = std::allocator<std::pair<Key, T>>, class IgnoredAllocator = std::allocator<std::pair<Key, T>>,
class Container = std::vector<std::pair<Key, T>, Allocator>> class Container = std::vector<std::pair<Key, T>>>
struct ordered_map : Container struct ordered_map : Container
{ {
using key_type = Key; using key_type = Key;
@ -16348,6 +16348,7 @@ class basic_json
using object_t = ObjectType<StringType, using object_t = ObjectType<StringType,
basic_json, basic_json,
object_comparator_t, object_comparator_t,
// TODO: AllocatorType<ObjectType::value_type>
AllocatorType<std::pair<const StringType, AllocatorType<std::pair<const StringType,
basic_json>>>; basic_json>>>;