Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66510 - website/public_html/beta/development
From: eric_at_[hidden]
Date: 2010-11-11 21:48:24


Author: eric_niebler
Date: 2010-11-11 21:48:19 EST (Thu, 11 Nov 2010)
New Revision: 66510
URL: http://svn.boost.org/trac/boost/changeset/66510

Log:
folks should use BOOST_ASSERT instead of C's assert
Text files modified:
   website/public_html/beta/development/requirements.html | 12 +++++++++++-
   1 files changed, 11 insertions(+), 1 deletions(-)

Modified: website/public_html/beta/development/requirements.html
==============================================================================
--- website/public_html/beta/development/requirements.html (original)
+++ website/public_html/beta/development/requirements.html 2010-11-11 21:48:19 EST (Thu, 11 Nov 2010)
@@ -357,13 +357,23 @@
                 </li>
               </ul>
 
+ <p><strong>Assertions:</strong> If you want to add runtime
+ assertions to your code (you should!), avoid C's
+ <code>assert</code> macro and use Boost's
+ <code>BOOST_ASSERT</code> macro (in
+ <code>boost/assert.hpp</code>) instead. It is more configurable.
+ Use <code>BOOST_ASSERT</code> in public headers and in library
+ source code (for separately compiled libraries). Use of C's
+ <code>assert</code> macro is ok in examples and in documentation.
+ </p>
+
               <p>Make sure your code compiles in the presence of the
               <code>min()</code> and <code>max()</code> macros. Some platform
               headers define <code>min()</code> and <code>max()</code> macros
               which cause some common C++ constructs to fail to compile. Some
               simple tricks can protect your code from inappropriate macro
               substitution:</p>
-
+
               <ul>
                 <li>If you want to call <code>std::min()</code> or
                 <code>std::max()</code>:


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk