6 #ifndef JSON_CONFIG_H_INCLUDED 7 #define JSON_CONFIG_H_INCLUDED 15 #include <type_traits> 19 #ifndef JSON_USE_EXCEPTION 20 #define JSON_USE_EXCEPTION 1 24 #ifndef JSON_USE_NULLREF 25 #define JSON_USE_NULLREF 1 34 #if defined(JSON_DLL_BUILD) 35 #if defined(_MSC_VER) || defined(__MINGW32__) 36 #define JSON_API __declspec(dllexport) 37 #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING 38 #elif defined(__GNUC__) || defined(__clang__) 39 #define JSON_API __attribute__((visibility("default"))) 40 #endif // if defined(_MSC_VER) 42 #elif defined(JSON_DLL) 43 #if defined(_MSC_VER) || defined(__MINGW32__) 44 #define JSON_API __declspec(dllimport) 45 #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING 46 #endif // if defined(_MSC_VER) 47 #endif // ifdef JSON_DLL_BUILD 49 #if !defined(JSON_API) 53 #if defined(_MSC_VER) && _MSC_VER < 1800 55 "ERROR: Visual Studio 12 (2013) with _MSC_VER=1800 is the oldest supported compiler with sufficient C++11 capabilities" 58 #if defined(_MSC_VER) && _MSC_VER < 1900 61 extern JSON_API
int msvc_pre1900_c99_snprintf(
char* outBuf,
size_t size,
62 const char* format, ...);
63 #define jsoncpp_snprintf msvc_pre1900_c99_snprintf 65 #define jsoncpp_snprintf std::snprintf 75 #define JSONCPP_OVERRIDE override 78 #if __has_extension(attribute_deprecated_with_message) 79 #define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message))) 81 #elif defined(__GNUC__) // not clang (gcc comes later since clang emulates gcc) 82 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) 83 #define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message))) 84 #elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) 85 #define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) 86 #endif // GNUC version 87 #elif defined(_MSC_VER) // MSVC (after clang because clang on Windows emulates 89 #define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) 90 #endif // __clang__ || __GNUC__ || _MSC_VER 92 #if !defined(JSONCPP_DEPRECATED) 93 #define JSONCPP_DEPRECATED(message) 94 #endif // if !defined(JSONCPP_DEPRECATED) 96 #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 6)) 97 #define JSON_USE_INT64_DOUBLE_CONVERSION 1 100 #if !defined(JSON_IS_AMALGAMATION) 102 #include "allocator.h" 105 #endif // if !defined(JSON_IS_AMALGAMATION) 109 using UInt =
unsigned int;
110 #if defined(JSON_NO_INT64) 111 using LargestInt = int;
112 using LargestUInt =
unsigned int;
113 #undef JSON_HAS_INT64 114 #else // if defined(JSON_NO_INT64) 116 #if defined(_MSC_VER) // Microsoft Visual Studio 117 using Int64 = __int64;
118 using UInt64 =
unsigned __int64;
119 #else // if defined(_MSC_VER) // Other platforms, use long long 120 using Int64 = int64_t;
121 using UInt64 = uint64_t;
122 #endif // if defined(_MSC_VER) 123 using LargestInt = Int64;
124 using LargestUInt = UInt64;
125 #define JSON_HAS_INT64 126 #endif // if defined(JSON_NO_INT64) 128 template <
typename T>
130 typename std::conditional<JSONCPP_USING_SECURE_MEMORY, SecureAllocator<T>,
131 std::allocator<T>>::type;
132 using String = std::basic_string<char, std::char_traits<char>, Allocator<char>>;
133 using IStringStream =
134 std::basic_istringstream<String::value_type, String::traits_type,
135 String::allocator_type>;
136 using OStringStream =
137 std::basic_ostringstream<String::value_type, String::traits_type,
138 String::allocator_type>;
139 using IStream = std::istream;
140 using OStream = std::ostream;
144 using JSONCPP_STRING = Json::String;
145 using JSONCPP_ISTRINGSTREAM = Json::IStringStream;
146 using JSONCPP_OSTRINGSTREAM = Json::OStringStream;
147 using JSONCPP_ISTREAM = Json::IStream;
148 using JSONCPP_OSTREAM = Json::OStream;
150 #endif // JSON_CONFIG_H_INCLUDED JSON (JavaScript Object Notation).
Definition: allocator.h:15
U32 size(const DenseVector< T > &lhs)
Return number of elements.
Definition: DenseVector.h:587