Use __has_attribute instead of gcc version in clang

This commit is contained in:
Nicolas Cornu
2015-08-27 13:34:22 +02:00
parent d05131f7e2
commit 034817c492

View File

@ -23,6 +23,10 @@
#define __has_extension __has_feature
#endif
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
@ -256,9 +260,7 @@
# define BOOST_NO_CXX14_DIGIT_SEPARATORS
#endif
// Unused attribute:
#if defined(__GNUC__) && (__GNUC__ >= 4)
#if __has_attribute(unused)
# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused))
#endif