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 34 #ifndef JSON_USE_NULLREF 35 #define JSON_USE_NULLREF 1 44 #include <cpptl/config.h> 45 #ifndef JSON_USE_CPPTL 46 #define JSON_USE_CPPTL 1 51 #define JSON_API CPPTL_API 52 #elif defined(JSON_DLL_BUILD) 53 #if defined(_MSC_VER) || defined(__MINGW32__) 54 #define JSON_API __declspec(dllexport) 55 #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING 56 #elif defined(__GNUC__) || defined(__clang__) 57 #define JSON_API __attribute__((visibility("default"))) 58 #endif // if defined(_MSC_VER) 59 #elif defined(JSON_DLL) 60 #if defined(_MSC_VER) || defined(__MINGW32__) 61 #define JSON_API __declspec(dllimport) 62 #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING 63 #endif // if defined(_MSC_VER) 64 #endif // ifdef JSON_IN_CPPTL 65 #if !defined(JSON_API) 69 #if defined(_MSC_VER) && _MSC_VER < 1800 71 "ERROR: Visual Studio 12 (2013) with _MSC_VER=1800 is the oldest supported compiler with sufficient C++11 capabilities" 74 #if defined(_MSC_VER) && _MSC_VER < 1900 78 const char* format, ...);
79 #define jsoncpp_snprintf msvc_pre1900_c99_snprintf 81 #define jsoncpp_snprintf std::snprintf 91 #define JSONCPP_OVERRIDE override 93 #if __cplusplus >= 201103L 94 #define JSONCPP_NOEXCEPT noexcept 95 #define JSONCPP_OP_EXPLICIT explicit 96 #elif defined(_MSC_VER) && _MSC_VER < 1900 97 #define JSONCPP_NOEXCEPT throw() 98 #define JSONCPP_OP_EXPLICIT explicit 99 #elif defined(_MSC_VER) && _MSC_VER >= 1900 100 #define JSONCPP_NOEXCEPT noexcept 101 #define JSONCPP_OP_EXPLICIT explicit 103 #define JSONCPP_NOEXCEPT throw() 104 #define JSONCPP_OP_EXPLICIT 108 #if __has_extension(attribute_deprecated_with_message) 109 #define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message))) 111 #elif defined(__GNUC__) // not clang (gcc comes later since clang emulates gcc) 112 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) 113 #define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message))) 114 #elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) 115 #define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) 116 #endif // GNUC version 117 #elif defined(_MSC_VER) // MSVC (after clang because clang on Windows emulates 119 #define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) 120 #endif // __clang__ || __GNUC__ || _MSC_VER 122 #if !defined(JSONCPP_DEPRECATED) 123 #define JSONCPP_DEPRECATED(message) 124 #endif // if !defined(JSONCPP_DEPRECATED) 126 #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 6)) 127 #define JSON_USE_INT64_DOUBLE_CONVERSION 1 130 #if !defined(JSON_IS_AMALGAMATION) 135 #endif // if !defined(JSON_IS_AMALGAMATION) 140 #if defined(JSON_NO_INT64) 143 #undef JSON_HAS_INT64 144 #else // if defined(JSON_NO_INT64) 146 #if defined(_MSC_VER) // Microsoft Visual Studio 149 #else // if defined(_MSC_VER) // Other platforms, use long long 150 typedef int64_t
Int64;
152 #endif // if defined(_MSC_VER) 155 #define JSON_HAS_INT64 156 #endif // if defined(JSON_NO_INT64) 158 template <
typename T>
160 typename std::conditional<JSONCPP_USING_SECURE_MEMORY, SecureAllocator<T>,
161 std::allocator<T>>::type;
164 std::basic_istringstream<String::value_type, String::traits_type,
165 String::allocator_type>;
167 std::basic_ostringstream<String::value_type, String::traits_type,
168 String::allocator_type>;
180 #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
typename std::conditional< 0, SecureAllocator< T >, std::allocator< T > >::type Allocator
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
Json::IStringStream JSONCPP_ISTRINGSTREAM
std::basic_string< char, std::char_traits< char >, Allocator< char > > String