From 0a01f3d655f38eba1683c03e41ba26fc4195d1e6 Mon Sep 17 00:00:00 2001 From: Pavel P Date: Sat, 19 Jan 2019 10:42:56 -0800 Subject: [PATCH] Do not reference SecureAllocator when not JSONCPP_USING_SECURE_MEMORY Amalgamated version of jsoncpp does not include allocator.h and as a result doesn't have definition of SecureAllocator and results in compilation error when referencing SecureAllocator in config.h --- include/json/config.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/json/config.h b/include/json/config.h index 1af868122..e22b8be39 100644 --- a/include/json/config.h +++ b/include/json/config.h @@ -173,10 +173,13 @@ typedef UInt64 LargestUInt; #define JSON_HAS_INT64 #endif // if defined(JSON_NO_INT64) +#if JSONCPP_USING_SECURE_MEMORY template -using Allocator = typename std::conditional, - std::allocator>::type; +using Allocator = SecureAllocator; +#else // !JSONCPP_USING_SECURE_MEMORY +template +using Allocator = std::allocator; +#endif // JSONCPP_USING_SECURE_MEMORY using String = std::basic_string, Allocator>; using IStringStream = std::basic_istringstream