Ignore -Wnonnull new gcc 11 warnings. (#28)

This commit is contained in:
Romain Geissler @ Amadeus
2021-03-04 03:23:14 +01:00
committed by GitHub
parent feb8accc6e
commit affc79e045
2 changed files with 28 additions and 0 deletions

View File

@ -28,7 +28,14 @@ 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 {};
@ -36,7 +43,14 @@ 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
@ -44,7 +58,14 @@ struct requirement<failed ************ Model::************>
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>

View File

@ -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)