mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-05-20 12:05:31 +02:00
Make preprocessor query robust against older gcc versions
This commit is contained in:
parent
871b311e7e
commit
5003983029
@ -70,8 +70,11 @@
|
|||||||
#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
|
#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
|
||||||
/// Indicates that the following function is deprecated.
|
/// Indicates that the following function is deprecated.
|
||||||
#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
|
#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
|
||||||
#elif (defined(__clang__) && __has_attribute(deprecated)) || \
|
#elif defined(__clang__) && defined(__has_feature)
|
||||||
(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
|
#if __has_feature(attribute_deprecated_with_message)
|
||||||
|
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
|
||||||
|
#endif
|
||||||
|
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
|
||||||
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
|
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
|
||||||
#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
||||||
#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
|
#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user