forked from boostorg/config
Add helper macro - BOOST_ATTRIBUTE_UNUSED - to suppress unused type/variable warnings.
This commit is contained in:
1 parent
5838168061
commit
003d33725e
6 files changed
+80
-2
No files matched your search
@@ -205,8 +205,10 @@
|
||||
# define BOOST_NO_CXX11_FINAL
|
||||
#endif
|
||||
|
||||
// Clang always supports variadic macros
|
||||
// Clang always supports extern templates
|
||||
// Unused attribute:
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "Clang version " __clang_version__
|
||||
|
||||
@@ -235,6 +235,12 @@
|
||||
# define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Unused attribute:
|
||||
#if __GNUC__ >= 4
|
||||
# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "GNU C++ version " __VERSION__
|
||||
#endif
|
||||
|
||||
@@ -940,6 +940,13 @@ namespace std{ using ::type_info; }
|
||||
#define BOOST_CONSTEXPR_OR_CONST constexpr
|
||||
#endif
|
||||
|
||||
//
|
||||
// Unused variable/typedef workarounds:
|
||||
//
|
||||
#ifndef BOOST_ATTRIBUTE_UNUSED
|
||||
# define BOOST_ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
|
||||
#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
|
||||
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user