From acd748e16f0462f73274fe02d37e157f808318ff Mon Sep 17 00:00:00 2001 From: gatopeich Date: Tue, 23 Jun 2020 12:03:21 +0100 Subject: [PATCH] Use std::map default allocator as a placeholder to extract the actual ObjectType::value_type Still fails on older compilers (GCC <= 5.5) --- include/nlohmann/json.hpp | 9 ++++++--- single_include/nlohmann/json.hpp | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 69afaf053..31944e32d 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -496,9 +496,12 @@ class basic_json using object_t = ObjectType - >::value_type>>; + // Note the use of std::map default allocator as a placeholder + // to extract the actual ObjectType::value_type + AllocatorType> + >::value_type>>; /*! @brief a type for an array diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index e6d87b31e..76ee27643 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -16348,9 +16348,12 @@ class basic_json using object_t = ObjectType - >::value_type>>; + // Note the use of std::map default allocator as a placeholder + // to extract the actual ObjectType::value_type + AllocatorType> + >::value_type>>; /*! @brief a type for an array