Avoid noisy warnings when instantiating BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH

This commit is contained in:
Ion Gaztañaga
2024-06-30 23:06:08 +02:00
parent 7d8040704a
commit bdc734f1e0
2 changed files with 7 additions and 2 deletions

View File

@@ -49,9 +49,10 @@
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) #if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-result" #pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif #endif
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
@@ -75,7 +76,7 @@
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9
#include <boost/intrusive/detail/has_member_function_callable_with.hpp> #include <boost/intrusive/detail/has_member_function_callable_with.hpp>
#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) #if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif

View File

@@ -236,4 +236,8 @@ namespace boost {
# define BOOST_CONTAINER_CONSTANT_VAR static BOOST_CONSTEXPR_OR_CONST # define BOOST_CONTAINER_CONSTANT_VAR static BOOST_CONSTEXPR_OR_CONST
#endif #endif
#if defined(__GNUC__) && ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600)
#define BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED
#endif
#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP #endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP