Use AllocatorType<ObjectType::value_type>,
instead of hard-coding it for std::map's value_type
This commit is contained in:
parent
15337b2cc3
commit
ddf0a45abb
6 changed files with 10 additions and 12 deletions
|
@ -15880,8 +15880,8 @@ namespace nlohmann
|
|||
/// ordered_map: a minimal map-like container that preserves insertion order
|
||||
/// for use within nlohmann::basic_json<ordered_map>
|
||||
template <class Key, class T, class IgnoredLess = std::less<Key>,
|
||||
class IgnoredAllocator = std::allocator<std::pair<Key, T>>,
|
||||
class Container = std::vector<std::pair<Key, T>>>
|
||||
class Allocator = std::allocator<std::pair<Key, T>>,
|
||||
class Container = std::vector<std::pair<Key, T>, Allocator>>
|
||||
struct ordered_map : Container
|
||||
{
|
||||
using key_type = Key;
|
||||
|
@ -16348,9 +16348,7 @@ class basic_json
|
|||
using object_t = ObjectType<StringType,
|
||||
basic_json,
|
||||
object_comparator_t,
|
||||
// TODO: AllocatorType<ObjectType::value_type>
|
||||
AllocatorType<std::pair<const StringType,
|
||||
basic_json>>>;
|
||||
AllocatorType<typename ObjectType<StringType, basic_json>::value_type>>;
|
||||
|
||||
/*!
|
||||
@brief a type for an array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue