mirror of
https://github.com/nlohmann/json.git
synced 2026-10-14 10:17:12 +00:00
Use std::map default allocator as a placeholder
to extract the actual ObjectType::value_type Still fails on older compilers (GCC <= 5.5)
This commit is contained in:
1 parent
49623a75ee
commit
acd748e16f
2 files changed
+12
-6
No files matched your search
@@ -496,9 +496,12 @@ class basic_json
|
||||
using object_t = ObjectType<StringType,
|
||||
basic_json,
|
||||
object_comparator_t,
|
||||
// Note: instantiating ObjectType with dummy allocator to extract ::value_type
|
||||
AllocatorType<typename ObjectType<StringType, basic_json, object_comparator_t, AllocatorType<int>
|
||||
>::value_type>>;
|
||||
// Note the use of std::map default allocator as a placeholder
|
||||
// to extract the actual ObjectType::value_type
|
||||
AllocatorType<typename
|
||||
ObjectType<StringType,basic_json,object_comparator_t,
|
||||
std::allocator<std::pair<const StringType, basic_json>>
|
||||
>::value_type>>;
|
||||
|
||||
/*!
|
||||
@brief a type for an array
|
||||
|
||||
Reference in new issue
Block a user