|
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 |
| 59 | +#if defined(_MSC_VER) // MSVC |
| 60 | +# if _MSC_VER <= 1200 // MSVC 6 |
60 | 61 | // Microsoft Visual Studio 6 only support conversion from __int64 to double |
61 | 62 | // (no conversion from unsigned __int64). |
62 | | - #define JSON_USE_INT64_DOUBLE_CONVERSION 1 |
| 63 | +# define JSON_USE_INT64_DOUBLE_CONVERSION 1 |
63 | 64 | // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' |
64 | 65 | // characters in the debug information) |
65 | 66 | // All projects I've ever seen with VS6 were using this globally (not bothering |
66 | 67 | // with pragma push/pop). |
67 | 68 | # pragma warning(disable : 4786) |
68 | | -#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6 |
| 69 | +# endif // MSVC 6 |
69 | 70 |
|
70 | | -#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008 |
| 71 | +# if _MSC_VER >= 1500 // MSVC 2008 |
71 | 72 | /// 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))) |
76 | | -#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__)) |
| 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 // has_feature |
| 89 | + |
| 90 | +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) |
| 91 | +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) |
| 92 | +#define JSON_HAS_RVALUE_REFERENCES 1 |
| 93 | +#endif // GXX_EXPERIMENTAL |
| 94 | + |
| 95 | +#endif // __clang__ || __GNUC__ |
| 96 | + |
| 97 | +#endif // not defined JSON_HAS_RVALUE_REFERENCES |
| 98 | + |
| 99 | +#ifndef JSON_HAS_RVALUE_REFERENCES |
| 100 | +#define JSON_HAS_RVALUE_REFERENCES 0 |
81 | 101 | #endif |
82 | 102 |
|
| 103 | +#ifdef __clang__ |
| 104 | +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) |
| 105 | +# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) |
| 106 | +# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) |
| 107 | +# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) |
| 108 | +# define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) |
| 109 | +# endif // GNUC version |
| 110 | +#endif // __clang__ || __GNUC__ |
| 111 | + |
83 | 112 | #if !defined(JSONCPP_DEPRECATED) |
84 | 113 | #define JSONCPP_DEPRECATED(message) |
85 | 114 | #endif // if !defined(JSONCPP_DEPRECATED) |
|
0 commit comments