Skip to content

Commit 5fe3d39

Browse files
author
gatopeich
committed
Using ordered_json instead of fifo_map in test-regression
This is more comprehensive and the "my_workaround_fifo_map" wrapper does not allow to infer value type as required in this branch. This reverts commit 064a9c9.
1 parent 064a9c9 commit 5fe3d39

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

include/nlohmann/json.hpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,7 @@ class basic_json
496496
using object_t = ObjectType<StringType,
497497
basic_json,
498498
object_comparator_t,
499-
// Note: instantiating ObjectType with dummy allocator to extract ::value_type
500-
AllocatorType<typename ObjectType<StringType, basic_json, object_comparator_t, AllocatorType<int>
501-
>::value_type>>;
499+
AllocatorType<typename ObjectType<StringType, basic_json>::value_type>>;
502500

503501
/*!
504502
@brief a type for an array

single_include/nlohmann/json.hpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -16348,9 +16348,7 @@ class basic_json
1634816348
using object_t = ObjectType<StringType,
1634916349
basic_json,
1635016350
object_comparator_t,
16351-
// Note: instantiating ObjectType with dummy allocator to extract ::value_type
16352-
AllocatorType<typename ObjectType<StringType, basic_json, object_comparator_t, AllocatorType<int>
16353-
>::value_type>>;
16351+
AllocatorType<typename ObjectType<StringType, basic_json>::value_type>>;
1635416352

1635516353
/*!
1635616354
@brief a type for an array

test/src/unit-regression.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,11 @@ using nlohmann::json;
5252
#include <variant>
5353
#endif
5454

55-
#include "fifo_map.hpp"
56-
5755
/////////////////////////////////////////////////////////////////////
5856
// for #972
5957
/////////////////////////////////////////////////////////////////////
6058

61-
template<class K, class V, class dummy_compare, class A>
62-
using my_workaround_fifo_map = nlohmann::fifo_map<K, V, nlohmann::fifo_map_compare<K>, A>;
63-
using my_json = nlohmann::basic_json<my_workaround_fifo_map>;
59+
using my_json = nlohmann::ordered_json;
6460

6561
/////////////////////////////////////////////////////////////////////
6662
// for #977

0 commit comments

Comments
 (0)