Skip to content

Commit

Permalink
Merge pull request #14725 from tamiko/fix_bundled_boost_warning
Browse files Browse the repository at this point in the history
Boost: apply an upstream patch to silence -Wnonnull warnings
  • Loading branch information
drwells committed Jan 25, 2023
2 parents bccb4be + 665c9f3 commit c8552d1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bundled/boost-1.70.0/include/boost/concept/detail/general.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,44 @@ namespace detail
template <class Model>
struct requirement
{
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnonnull"
# endif
static void failed() { ((Model*)0)->~Model(); }
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic pop
# endif
};

struct failed {};

template <class Model>
struct requirement<failed ************ Model::************>
{
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnonnull"
# endif
static void failed() { ((Model*)0)->~Model(); }
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic pop
# endif
};

# ifdef BOOST_OLD_CONCEPT_SUPPORT

template <class Model>
struct constraint
{
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnonnull"
# endif
static void failed() { ((Model*)0)->constraints(); }
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic pop
# endif
};

template <class Model>
Expand Down
7 changes: 7 additions & 0 deletions bundled/boost-1.70.0/include/boost/concept/usage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ namespace boost { namespace concepts {
template <class Model>
struct usage_requirements
{
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnonnull"
# endif
~usage_requirements() { ((Model*)0)->~Model(); }
# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
# pragma GCC diagnostic pop
# endif
};

# if BOOST_WORKAROUND(__GNUC__, <= 3)
Expand Down

0 comments on commit c8552d1

Please sign in to comment.