diff options
author | Takayuki MATSUOKA <takayuki.matsuoka@gmail.com> | 2016-11-19 13:08:48 (GMT) |
---|---|---|
committer | Takayuki MATSUOKA <takayuki.matsuoka@gmail.com> | 2016-11-19 13:08:48 (GMT) |
commit | b4db9d7e35e67f509b6d6741efddd8ec087398a2 (patch) | |
tree | c2b995e925b569c649f5f21a5e6f0b68f2618fde /lib/lz4.h | |
parent | a38cbf9f62a9d7200086b9965745ad7330cac259 (diff) | |
download | lz4-b4db9d7e35e67f509b6d6741efddd8ec087398a2.zip lz4-b4db9d7e35e67f509b6d6741efddd8ec087398a2.tar.gz lz4-b4db9d7e35e67f509b6d6741efddd8ec087398a2.tar.bz2 |
Add C++14 standard [[deprecated]] attribute
See also
For __cplusplus predefined macro, https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
For [[deprecated]] attribute, https://isocpp.org/wiki/faq/cpp14-language#deprecated-attribute
Diffstat (limited to 'lib/lz4.h')
-rw-r--r-- | lib/lz4.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -413,7 +413,9 @@ union LZ4_streamDecode_u { # define LZ4_DEPRECATED(message) /* disable deprecation warnings */ #else # define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) -# if (LZ4_GCC_VERSION >= 405) || defined(__clang__) +# if defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */ +# define LZ4_DEPRECATED(message) [[deprecated(message)]] +# elif (LZ4_GCC_VERSION >= 405) || defined(__clang__) # define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) # elif (LZ4_GCC_VERSION >= 301) # define LZ4_DEPRECATED(message) __attribute__((deprecated)) |