3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/assert-not.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Macros / Asserts / BOOST_MPL_ASSERT_NOT |
#define[BOOST\_MPL\_ASSERT\_NOT](./assert-not.html)( pred ) \_unspecified token sequence_\
/**/
Generates a compilation error when predicate holds true.
#include <[boost/mpl/assert.hpp](../../../../boost/mpl/assert.hpp)>
| Parameter | Requirement | Description |
|---|---|---|
| pred | Boolean nullary Metafunction | A predicate to be asserted to be false. |
For any boolean nullary Metafunction pred:
[BOOST\_MPL\_ASSERT\_NOT](./assert-not.html)(( pred ));
| Return type: |
None.
| | Semantics: |
Generates a compilation error if pred::type::value != false, otherwise has no effect. Note that double parentheses are required even if no commas appear in the condition.
When possible within the compiler's diagnostic capabilities, the error message will include the predicate's full type name, and have a general form of:
_..._************boost::mpl::[not\_](./not.html)< pred >::************_..._
|
template< typename T, typename U > struct my
{
// ...[BOOST\_MPL\_ASSERT\_NOT](./assert-not.html)(( is_same< T,U > ));
};
my<void,void> test;
// In instantiation of `my<void, void>':
// instantiated from here
// conversion from `
// mpl_::failed ************ boost::mpl::[not\_](./not.html)<boost::is_same<void, void>
// >:: ************' to non-scalar type `mpl_::assert<false>' requested
Asserts, BOOST_MPL_ASSERT, BOOST_MPL_ASSERT_MSG, BOOST_MPL_ASSERT_RELATION
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |