Skip to content

Commit

Permalink
Avoid noisy warnings when instantiating BOOST_INTRUSIVE_HAS_MEMBER_FU…
Browse files Browse the repository at this point in the history
…NCTION_CALLABLE_WITH
  • Loading branch information
igaztanaga committed Jun 30, 2024
1 parent 7d80407 commit bdc734f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/boost/container/allocator_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@

#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 ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif

#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
Expand All @@ -75,7 +76,7 @@
#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9
#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
#endif

Expand Down
4 changes: 4 additions & 0 deletions include/boost/container/detail/workaround.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,8 @@ namespace boost {
# define BOOST_CONTAINER_CONSTANT_VAR static BOOST_CONSTEXPR_OR_CONST
#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

0 comments on commit bdc734f

Please sign in to comment.