Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66515 - website/public_html/live/development
From: eric_at_[hidden]
Date: 2010-11-11 22:56:36


Author: eric_niebler
Date: 2010-11-11 22:56:35 EST (Thu, 11 Nov 2010)
New Revision: 66515
URL: http://svn.boost.org/trac/boost/changeset/66515

Log:
add developer guideline about using BOOST_ASSERT instead of C's assert
Text files modified:
   website/public_html/live/development/requirements.html | 10 ++++++++++
   1 files changed, 10 insertions(+), 0 deletions(-)

Modified: website/public_html/live/development/requirements.html
==============================================================================
--- website/public_html/live/development/requirements.html (original)
+++ website/public_html/live/development/requirements.html 2010-11-11 22:56:35 EST (Thu, 11 Nov 2010)
@@ -357,6 +357,16 @@
                 </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


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