1<html> 2<head> 3 <title>BOOST_PP_ASSERT_MSG</title> 4 <link rel="stylesheet" type="text/css" href="../styles.css"> 5</head> 6<body> 7 <div style="margin-left: 0px;"> 8 The <b>BOOST_PP_ASSERT_MSG</b> macro conditionally inserts debugging text. 9 </div> 10 <h4>Usage</h4> 11 <div class="code"> 12 <b>BOOST_PP_ASSERT_MSG</b>(<i>cond</i>, <i>msg</i>) 13 </div> 14 <h4>Arguments</h4> 15 <dl> 16 <dt>cond</dt> 17 <dd> 18 A condition that determines whether an assertion occurs. 19 Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>. 20 </dd> 21 <dt>msg</dt> 22 <dd> 23 A message to display if <i>cond</i> evaluates to <i>0</i>. 24 </dd> 25 </dl> 26 <h4>Remarks</h4> 27 <div> 28 If <i>cond</i> expands to <i>0</i>, this macro expands to <i>msg</i>. 29 Otherwise, it expands to nothing. 30 </div> 31 <h4>See Also</h4> 32 <ul> 33 <li><a href="assert_msg.html">BOOST_PP_ASSERT_MSG</a></li> 34 <li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li> 35 </ul> 36 <h4>Requirements</h4> 37 <div> 38 <b>Header:</b> <a href="../headers/debug/assert.html"><boost/preprocessor/debug/assert.hpp></a> 39 </div> 40 <h4>Sample Code</h4> 41<div><pre> 42#include <<a href="../headers/comparison/equal.html">boost/preprocessor/comparison/equal.hpp</a>> 43#include <<a href="../headers/debug/assert.html">boost/preprocessor/debug/assert.hpp</a>> 44 45// lines are supposed to be counted 46// in translation phase 1 47 48#line 9 49<a href="assert_msg.html">BOOST_PP_ASSERT_MSG</a>( \ 50 BOOST_PP_EQUAL(__LINE__, 9), \ 51 "incorrect line numbering detected" \ 52) 53</pre></div> 54 <hr size="1"> 55 <div style="margin-left: 0px;"> 56 <i>� Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i> 57 </br><i>� Copyright Paul Mensonides 2002</i> 58 </div> 59 <div style="margin-left: 0px;"> 60 <p><small>Distributed under the Boost Software License, Version 1.0. (See 61 accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or 62 copy at <a href= 63 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> 64 </div> 65</body> 66</html> 67