mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-05 15:54:39 +02:00
Workaround cw bug (from branch).
[SVN r24977]
This commit is contained in:
@@ -61,6 +61,19 @@ template<> struct assert<false> { typedef AUX778076_ASSERT_ARG(assert)
|
|||||||
template< bool C >
|
template< bool C >
|
||||||
int assertion_failed( typename assert<C>::type );
|
int assertion_failed( typename assert<C>::type );
|
||||||
|
|
||||||
|
template <bool C>
|
||||||
|
struct assertion
|
||||||
|
{
|
||||||
|
static int failed(assert<false>);
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct assertion<true>
|
||||||
|
{
|
||||||
|
template <class T>
|
||||||
|
static int failed(T);
|
||||||
|
};
|
||||||
|
|
||||||
struct assert_
|
struct assert_
|
||||||
{
|
{
|
||||||
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||||
@@ -272,16 +285,18 @@ enum { \
|
|||||||
|
|
||||||
// BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) )
|
// BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) )
|
||||||
|
|
||||||
# define BOOST_MPL_ASSERT_MSG( c, msg, types ) \
|
# define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \
|
||||||
struct msg; \
|
struct msg; \
|
||||||
typedef struct BOOST_PP_CAT(msg,__LINE__) : boost::mpl::assert_ \
|
typedef struct BOOST_PP_CAT(msg,__LINE__) : boost::mpl::assert_ \
|
||||||
{ \
|
{ \
|
||||||
static boost::mpl::failed **************** (msg::**************** assert_arg()) types \
|
using boost::mpl::assert_::types; \
|
||||||
|
enum { msg }; \
|
||||||
|
static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
|
||||||
{ return 0; } \
|
{ return 0; } \
|
||||||
} BOOST_PP_CAT(mpl_assert_arg,__LINE__); \
|
} BOOST_PP_CAT(mpl_assert_arg,__LINE__); \
|
||||||
enum { \
|
enum { \
|
||||||
BOOST_PP_CAT(mpl_assertion_in_line_,__LINE__) = sizeof( \
|
BOOST_PP_CAT(mpl_assertion_in_line_,__LINE__) = sizeof( \
|
||||||
boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,__LINE__)::assert_arg() ) \
|
boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,__LINE__)::assert_arg() ) \
|
||||||
) \
|
) \
|
||||||
}\
|
}\
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user