|
56 | 56 | // Storages, and 64 bits integer support is disabled. |
57 | 57 | // #define JSON_NO_INT64 1 |
58 | 58 |
|
59 | | -#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6 |
60 | | -// Microsoft Visual Studio 6 only support conversion from __int64 to double |
61 | | -// (no conversion from unsigned __int64). |
62 | | -#define JSON_USE_INT64_DOUBLE_CONVERSION 1 |
63 | | -// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' |
64 | | -// characters in the debug information) |
65 | | -// All projects I've ever seen with VS6 were using this globally (not bothering |
66 | | -// with pragma push/pop). |
67 | | -#pragma warning(disable : 4786) |
68 | | -#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6 |
69 | | - |
70 | | -#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008 |
71 | | -/// Indicates that the following function is deprecated. |
72 | | -#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) |
73 | | -#elif defined(__clang__) && defined(__has_feature) |
74 | | -#if __has_feature(attribute_deprecated_with_message) |
75 | | -#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) |
| 59 | +#if defined(_MSC_VER) // MSVC |
| 60 | +# if _MSC_VER <= 1200 // MSVC 6 |
| 61 | + // Microsoft Visual Studio 6 only support conversion from __int64 to double |
| 62 | + // (no conversion from unsigned __int64). |
| 63 | +# define JSON_USE_INT64_DOUBLE_CONVERSION 1 |
| 64 | + // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' |
| 65 | + // characters in the debug information) |
| 66 | + // All projects I've ever seen with VS6 were using this globally (not bothering |
| 67 | + // with pragma push/pop). |
| 68 | +# pragma warning(disable : 4786) |
| 69 | +# endif // MSVC 6 |
| 70 | + |
| 71 | +# if _MSC_VER >= 1500 // MSVC 2008 |
| 72 | + /// Indicates that the following function is deprecated. |
| 73 | +# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) |
| 74 | +# endif |
| 75 | + |
| 76 | +#endif // defined(_MSC_VER) |
| 77 | + |
| 78 | + |
| 79 | +#ifndef JSON_HAS_RVALUE_REFERENCES |
| 80 | + |
| 81 | +#if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010 |
| 82 | +#define JSON_HAS_RVALUE_REFERENCES 1 |
| 83 | +#endif // MSVC >= 2010 |
| 84 | + |
| 85 | +#ifdef __clang__ |
| 86 | +#if __has_feature(cxx_rvalue_references) |
| 87 | +#define JSON_HAS_RVALUE_REFERENCES 1 |
| 88 | +#endif |
| 89 | +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) |
| 90 | +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) |
| 91 | +#define JSON_HAS_RVALUE_REFERENCES 1 |
76 | 92 | #endif |
77 | | -#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) |
78 | | -#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) |
79 | | -#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) |
80 | | -#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) |
| 93 | +#endif // __clang__ || __GNUC__ |
| 94 | + |
| 95 | +#endif // not defined JSON_HAS_RVALUE_REFERENCES |
| 96 | + |
| 97 | +#ifndef JSON_HAS_RVALUE_REFERENCES |
| 98 | +#define JSON_HAS_RVALUE_REFERENCES 0 |
81 | 99 | #endif |
82 | 100 |
|
83 | 101 | #if !defined(JSONCPP_DEPRECATED) |
|
0 commit comments