6 #ifndef JSON_CONFIG_H_INCLUDED 7 #define JSON_CONFIG_H_INCLUDED 15 #include <type_traits> 29 #ifndef JSON_USE_EXCEPTION 30 #define JSON_USE_EXCEPTION 1 39 #include <cpptl/config.h> 40 #ifndef JSON_USE_CPPTL 41 #define JSON_USE_CPPTL 1 46 #define JSON_API CPPTL_API 47 #elif defined(JSON_DLL_BUILD) 48 #if defined(_MSC_VER) || defined(__MINGW32__) 49 #define JSON_API __declspec(dllexport) 50 #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING 51 #elif defined(__GNUC__) || defined(__clang__) 52 #define JSON_API __attribute__((visibility("default"))) 53 #endif // if defined(_MSC_VER) 54 #elif defined(JSON_DLL) 55 #if defined(_MSC_VER) || defined(__MINGW32__) 56 #define JSON_API __declspec(dllimport) 57 #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING 58 #endif // if defined(_MSC_VER) 59 #endif // ifdef JSON_IN_CPPTL 60 #if !defined(JSON_API) 64 #if defined(_MSC_VER) && _MSC_VER < 1800 66 "ERROR: Visual Studio 12 (2013) with _MSC_VER=1800 is the oldest supported compiler with sufficient C++11 capabilities" 69 #if defined(_MSC_VER) && _MSC_VER < 1900 74 #define jsoncpp_snprintf msvc_pre1900_c99_snprintf 76 #define jsoncpp_snprintf std::snprintf 86 #define JSONCPP_OVERRIDE override 88 #if __cplusplus >= 201103L 89 #define JSONCPP_NOEXCEPT noexcept 90 #define JSONCPP_OP_EXPLICIT explicit 91 #elif defined(_MSC_VER) && _MSC_VER < 1900 92 #define JSONCPP_NOEXCEPT throw() 93 #define JSONCPP_OP_EXPLICIT explicit 94 #elif defined(_MSC_VER) && _MSC_VER >= 1900 95 #define JSONCPP_NOEXCEPT noexcept 96 #define JSONCPP_OP_EXPLICIT explicit 98 #define JSONCPP_NOEXCEPT throw() 99 #define JSONCPP_OP_EXPLICIT 103 #if __has_extension(attribute_deprecated_with_message) 104 #define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message))) 106 #elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) 107 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) 108 #define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message))) 109 #elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) 110 #define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) 111 #endif // GNUC version 112 #elif defined(_MSC_VER) // MSVC (after clang because clang on Windows emulates 114 #define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) 115 #endif // __clang__ || __GNUC__ || _MSC_VER 117 #if !defined(JSONCPP_DEPRECATED) 118 #define JSONCPP_DEPRECATED(message) 119 #endif // if !defined(JSONCPP_DEPRECATED) 122 #define JSON_USE_INT64_DOUBLE_CONVERSION 1 125 #if !defined(JSON_IS_AMALGAMATION) 130 #endif // if !defined(JSON_IS_AMALGAMATION) 135 #if defined(JSON_NO_INT64) 138 #undef JSON_HAS_INT64 139 #else // if defined(JSON_NO_INT64) 141 #if defined(_MSC_VER) // Microsoft Visual Studio 144 #else // if defined(_MSC_VER) // Other platforms, use long long 145 typedef int64_t
Int64;
147 #endif // if defined(_MSC_VER) 150 #define JSON_HAS_INT64 151 #endif // if defined(JSON_NO_INT64) 153 template <
typename T>
154 using Allocator =
typename std::conditional<JSONCPP_USING_SECURE_MEMORY,
156 std::allocator<T>>::type;
158 using IStringStream = std::basic_istringstream<String::value_type,
160 String::allocator_type>;
161 using OStringStream = std::basic_ostringstream<String::value_type,
163 String::allocator_type>;
175 #endif // JSON_CONFIG_H_INCLUDED
#define JSON_API
If defined, indicates that the source file is amalgamated to prevent private header inclusion...
Json::IStream JSONCPP_ISTREAM
std::basic_istringstream< String::value_type, String::traits_type, String::allocator_type > IStringStream
Json::String JSONCPP_STRING
Json::OStringStream JSONCPP_OSTRINGSTREAM
std::basic_ostringstream< String::value_type, String::traits_type, String::allocator_type > OStringStream
JSON (JavaScript Object Notation).
int msvc_pre1900_c99_snprintf(char *outBuf, size_t size, const char *format,...)
Json::OStream JSONCPP_OSTREAM
typename std::conditional< JSONCPP_USING_SECURE_MEMORY, SecureAllocator< T >, std::allocator< T > >::type Allocator
Json::IStringStream JSONCPP_ISTRINGSTREAM
std::basic_string< char, std::char_traits< char >, Allocator< char > > String