mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-29 12:07:36 +02:00
Added notes for CWG 496 and CWG 2094
rename macros to be more descriptive
This commit is contained in:
@ -9,17 +9,27 @@
|
||||
|
||||
#include <boost/fusion/support/detail/is_trivially_copyable.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#ifndef BOOST_FUSION_DETAIL_VOLATILE_SCALAR_IS_NON_TRIVIALLY_COPYABLE
|
||||
# define BOOST_FUSION_ASSERT_WA BOOST_MPL_ASSERT
|
||||
#if defined(BOOST_FUSION_DETAIL_VOLATILE_SCALAR_IS_NON_TRIVIALLY_COPYABLE)
|
||||
# define BOOST_FUSION_ASSERT_CWG496_SCALAR BOOST_MPL_ASSERT_NOT
|
||||
#elif defined(BOOST_FUSION_IS_TRIVIALLY_COPYABLE)
|
||||
# define BOOST_FUSION_ASSERT_CWG496_SCALAR_I(...) BOOST_STATIC_ASSERT((__VA_ARGS__::value) == BOOST_FUSION_IS_TRIVIALLY_COPYABLE(int volatile))
|
||||
# define BOOST_FUSION_ASSERT_CWG496_SCALAR(pred) BOOST_FUSION_ASSERT_CWG496_SCALAR_I pred
|
||||
#else
|
||||
# define BOOST_FUSION_ASSERT_WA BOOST_MPL_ASSERT_NOT
|
||||
# define BOOST_FUSION_ASSERT_CWG496_SCALAR BOOST_MPL_ASSERT
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_FUSION_DETAIL_IS_TRIVIALLY_COPYABLE_CONFORMING
|
||||
# define BOOST_FUSION_ASSERT_FALLBACK BOOST_MPL_ASSERT
|
||||
#if defined(BOOST_FUSION_IS_TRIVIALLY_COPYABLE)
|
||||
# define BOOST_FUSION_ASSERT_CWG496 BOOST_MPL_ASSERT
|
||||
# define BOOST_FUSION_ASSERT_CWG2094_I(...) BOOST_STATIC_ASSERT((__VA_ARGS__::value) == BOOST_FUSION_IS_TRIVIALLY_COPYABLE(trivial volatile))
|
||||
# define BOOST_FUSION_ASSERT_CWG2094(pred) BOOST_FUSION_ASSERT_CWG2094_I pred
|
||||
#elif defined(BOOST_FUSION_DETAIL_IS_TRIVIALLY_COPYABLE_CONFORMING)
|
||||
# define BOOST_FUSION_ASSERT_CWG496 BOOST_MPL_ASSERT
|
||||
# define BOOST_FUSION_ASSERT_CWG2094 BOOST_MPL_ASSERT
|
||||
#else
|
||||
# define BOOST_FUSION_ASSERT_FALLBACK(cond) BOOST_MPL_ASSERT((boost::mpl::true_))
|
||||
# define BOOST_FUSION_ASSERT_CWG496(pred) struct skip_assertion
|
||||
# define BOOST_FUSION_ASSERT_CWG2094(pred) struct skip_assertion
|
||||
#endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user