1 #ifndef BOOST_PREPROCESSOR_ASSERT_MSG_HPP
2 #define BOOST_PREPROCESSOR_ASSERT_MSG_HPP
6 * http://www.housemarque.com
8 * Permission to copy, use, modify, sell and distribute this software is
9 * granted provided this copyright notice appears in all copies. This
10 * software is provided "as is" without express or implied warranty, and
11 * with no claim as to its suitability for any purpose.
13 * See http://www.boost.org for most recent version.
16 #include <boost/preprocessor/expr_if.hpp>
17 #include <boost/preprocessor/logical/not.hpp>
19 /** <p>Expands to nothing if <code>COND != 0</code> and to <code>MSG</code> if
20 <code>COND == 0</code>.</p>
22 <p><code>COND</code> must expand to an integer literal in the range [0, BOOST_PP_LIMIT_MAG].</p>
24 <p>For example, <code>BOOST_PP_ASSERT_MSG(1,A BUG!)</code> expands to <code>A BUG!</code>.</p>
26 #define BOOST_PP_ASSERT_MSG(COND,MSG) BOOST_PP_EXPR_IF(BOOST_PP_NOT(COND),MSG)
28 /* <p>Obsolete. Use BOOST_PP_ASSERT_MSG().</p> */
29 #define BOOST_PREPROCESSOR_ASSERT_MSG(C,MSG) BOOST_PP_ASSERT_MSG(C,MSG)