Add helper macro - BOOST_ATTRIBUTE_UNUSED - to suppress unused type/variable warnings.

This commit is contained in:
jzmaddock committed 2014-10-11 13:10:25 +01:00
1 parent 5838168061
commit 003d33725e
6 files changed
+80 -2

No files matched your search

+4 -2
View File
@@ -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__
+6
View File
@@ -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
+7
View File
@@ -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
//