mirror of
https://github.com/boostorg/concept_check.git
synced 2025-07-29 20:17:36 +02:00
Ignore -Wnonnull new gcc 11 warnings. (#28)
This commit is contained in:
committed by
GitHub
parent
feb8accc6e
commit
affc79e045
@ -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>
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user