Skip to content

Commit

Permalink
Using ordered_json instead of fifo_map in test-regression
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gatopeich committed Jun 22, 2020
1 parent 064a9c9 commit 5fe3d39
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
4 changes: 1 addition & 3 deletions include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,7 @@ 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>>;
AllocatorType<typename ObjectType<StringType, basic_json>::value_type>>;

/*!
@brief a type for an array
Expand Down
4 changes: 1 addition & 3 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16348,9 +16348,7 @@ 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>>;
AllocatorType<typename ObjectType<StringType, basic_json>::value_type>>;

/*!
@brief a type for an array
Expand Down
6 changes: 1 addition & 5 deletions test/src/unit-regression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,11 @@ using nlohmann::json;
#include <variant>
#endif

#include "fifo_map.hpp"

/////////////////////////////////////////////////////////////////////
// for #972
/////////////////////////////////////////////////////////////////////

template<class K, class V, class dummy_compare, class A>
using my_workaround_fifo_map = nlohmann::fifo_map<K, V, nlohmann::fifo_map_compare<K>, A>;
using my_json = nlohmann::basic_json<my_workaround_fifo_map>;
using my_json = nlohmann::ordered_json;

/////////////////////////////////////////////////////////////////////
// for #977
Expand Down

0 comments on commit 5fe3d39

Please sign in to comment.