Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost: apply an upstream patch to silence -Wnonnull warnings #14725

Merged
merged 1 commit into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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