66#ifndef JSON_CONFIG_H_INCLUDED
77#define JSON_CONFIG_H_INCLUDED
88#include < stddef.h>
9- #include < string> // typedef String
109#include < stdint.h> // typedef int64_t, uint64_t
10+ #include < string> // typedef String
1111
1212// / If defined, indicates that json library is embedded in CppTL library.
1313// # define JSON_IN_CPPTL 1
6060// #define JSON_NO_INT64 1
6161
6262#if defined(_MSC_VER) // MSVC
63- # if _MSC_VER <= 1200 // MSVC 6
64- // Microsoft Visual Studio 6 only support conversion from __int64 to double
65- // (no conversion from unsigned __int64).
66- # define JSON_USE_INT64_DOUBLE_CONVERSION 1
67- // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
68- // characters in the debug information)
69- // All projects I've ever seen with VS6 were using this globally (not bothering
70- // with pragma push/pop).
71- # pragma warning(disable : 4786)
72- # endif // MSVC 6
73-
74- # if _MSC_VER >= 1500 // MSVC 2008
75- // / Indicates that the following function is deprecated.
76- # define JSONCPP_DEPRECATED (message ) __declspec(deprecated(message))
77- # endif
63+ #if _MSC_VER <= 1200 // MSVC 6
64+ // Microsoft Visual Studio 6 only support conversion from __int64 to double
65+ // (no conversion from unsigned __int64).
66+ #define JSON_USE_INT64_DOUBLE_CONVERSION 1
67+ // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
68+ // characters in the debug information)
69+ // All projects I've ever seen with VS6 were using this globally (not bothering
70+ // with pragma push/pop).
71+ #pragma warning(disable : 4786)
72+ #endif // MSVC 6
73+
74+ #if _MSC_VER >= 1500 // MSVC 2008
75+ // / Indicates that the following function is deprecated.
76+ #define JSONCPP_DEPRECATED (message ) __declspec(deprecated(message))
77+ #endif
7878
7979#endif // defined(_MSC_VER)
8080
8181// In c++11 the override keyword allows you to explicitly define that a function
8282// is intended to override the base-class version. This makes the code more
8383// manageable and fixes a set of common hard-to-find bugs.
8484#if __cplusplus >= 201103L
85- # define JSONCPP_OVERRIDE override
86- # define JSONCPP_NOEXCEPT noexcept
87- # define JSONCPP_OP_EXPLICIT explicit
85+ #define JSONCPP_OVERRIDE override
86+ #define JSONCPP_NOEXCEPT noexcept
87+ #define JSONCPP_OP_EXPLICIT explicit
8888#elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900
89- # define JSONCPP_OVERRIDE override
90- # define JSONCPP_NOEXCEPT throw ()
91- # if _MSC_VER >= 1800 // MSVC 2013
92- # define JSONCPP_OP_EXPLICIT explicit
93- # else
94- # define JSONCPP_OP_EXPLICIT
95- # endif
89+ #define JSONCPP_OVERRIDE override
90+ #define JSONCPP_NOEXCEPT throw ()
91+ #if _MSC_VER >= 1800 // MSVC 2013
92+ #define JSONCPP_OP_EXPLICIT explicit
93+ #else
94+ #define JSONCPP_OP_EXPLICIT
95+ #endif
9696#elif defined(_MSC_VER) && _MSC_VER >= 1900
97- # define JSONCPP_OVERRIDE override
98- # define JSONCPP_NOEXCEPT noexcept
99- # define JSONCPP_OP_EXPLICIT explicit
97+ #define JSONCPP_OVERRIDE override
98+ #define JSONCPP_NOEXCEPT noexcept
99+ #define JSONCPP_OP_EXPLICIT explicit
100100#else
101- # define JSONCPP_OVERRIDE
102- # define JSONCPP_NOEXCEPT throw ()
103- # define JSONCPP_OP_EXPLICIT
101+ #define JSONCPP_OVERRIDE
102+ #define JSONCPP_NOEXCEPT throw ()
103+ #define JSONCPP_OP_EXPLICIT
104104#endif
105105
106106#ifndef JSON_HAS_RVALUE_REFERENCES
112112#ifdef __clang__
113113#if __has_feature(cxx_rvalue_references)
114114#define JSON_HAS_RVALUE_REFERENCES 1
115- #endif // has_feature
115+ #endif // has_feature
116116
117117#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
118118#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
119119#define JSON_HAS_RVALUE_REFERENCES 1
120- #endif // GXX_EXPERIMENTAL
120+ #endif // GXX_EXPERIMENTAL
121121
122122#endif // __clang__ || __GNUC__
123123
128128#endif
129129
130130#ifdef __clang__
131- # if __has_extension(attribute_deprecated_with_message)
132- # define JSONCPP_DEPRECATED (message ) __attribute__ ((deprecated(message)))
133- # endif
131+ #if __has_extension(attribute_deprecated_with_message)
132+ #define JSONCPP_DEPRECATED (message ) __attribute__((deprecated(message)))
133+ #endif
134134#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
135- # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
136- # define JSONCPP_DEPRECATED (message ) __attribute__ ((deprecated(message)))
137- # elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
138- # define JSONCPP_DEPRECATED (message ) __attribute__((__deprecated__))
139- # endif // GNUC version
135+ #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
136+ #define JSONCPP_DEPRECATED (message ) __attribute__((deprecated(message)))
137+ #elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
138+ #define JSONCPP_DEPRECATED (message ) __attribute__((__deprecated__))
139+ #endif // GNUC version
140140#endif // __clang__ || __GNUC__
141141
142142#if !defined(JSONCPP_DEPRECATED)
143143#define JSONCPP_DEPRECATED (message )
144144#endif // if !defined(JSONCPP_DEPRECATED)
145145
146146#if __GNUC__ >= 6
147- # define JSON_USE_INT64_DOUBLE_CONVERSION 1
147+ #define JSON_USE_INT64_DOUBLE_CONVERSION 1
148148#endif
149149
150150#if !defined(JSON_IS_AMALGAMATION)
151151
152- # include " version.h"
152+ #include " version.h"
153153
154- # if JSONCPP_USING_SECURE_MEMORY
155- # include " allocator.h" // typedef Allocator
156- # endif
154+ #if JSONCPP_USING_SECURE_MEMORY
155+ #include " allocator.h" // typedef Allocator
156+ #endif
157157
158158#endif // if !defined(JSON_IS_AMALGAMATION)
159159
@@ -172,23 +172,28 @@ typedef unsigned __int64 UInt64;
172172#else // if defined(_MSC_VER) // Other platforms, use long long
173173typedef int64_t Int64;
174174typedef uint64_t UInt64;
175- #endif // if defined(_MSC_VER)
175+ #endif // if defined(_MSC_VER)
176176typedef Int64 LargestInt;
177177typedef UInt64 LargestUInt;
178178#define JSON_HAS_INT64
179179#endif // if defined(JSON_NO_INT64)
180180#if JSONCPP_USING_SECURE_MEMORY
181- #define JSONCPP_STRING std::basic_string<char , std::char_traits<char >, Json::SecureAllocator<char > >
182- #define JSONCPP_OSTRINGSTREAM std::basic_ostringstream<char , std::char_traits<char >, Json::SecureAllocator<char > >
183- #define JSONCPP_OSTREAM std::basic_ostream<char , std::char_traits<char >>
184- #define JSONCPP_ISTRINGSTREAM std::basic_istringstream<char , std::char_traits<char >, Json::SecureAllocator<char > >
185- #define JSONCPP_ISTREAM std::istream
181+ #define JSONCPP_STRING \
182+ std::basic_string<char , std::char_traits<char >, Json::SecureAllocator<char > >
183+ #define JSONCPP_OSTRINGSTREAM \
184+ std::basic_ostringstream<char , std::char_traits<char >, \
185+ Json::SecureAllocator<char > >
186+ #define JSONCPP_OSTREAM std::basic_ostream<char , std::char_traits<char > >
187+ #define JSONCPP_ISTRINGSTREAM \
188+ std::basic_istringstream<char , std::char_traits<char >, \
189+ Json::SecureAllocator<char > >
190+ #define JSONCPP_ISTREAM std::istream
186191#else
187- #define JSONCPP_STRING std::string
192+ #define JSONCPP_STRING std::string
188193#define JSONCPP_OSTRINGSTREAM std::ostringstream
189- #define JSONCPP_OSTREAM std::ostream
194+ #define JSONCPP_OSTREAM std::ostream
190195#define JSONCPP_ISTRINGSTREAM std::istringstream
191- #define JSONCPP_ISTREAM std::istream
196+ #define JSONCPP_ISTREAM std::istream
192197#endif // if JSONCPP_USING_SECURE_MEMORY
193198} // end namespace Json
194199
0 commit comments