|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r48730 - trunk/boost/dynamic_bitset
From: gennaro.prota_at_[hidden]
Date: 2008-09-11 05:46:55
Author: gennaro_prota
Date: 2008-09-11 05:46:54 EDT (Thu, 11 Sep 2008)
New Revision: 48730
URL: http://svn.boost.org/trac/boost/changeset/48730
Log:
dynamic_bitset: in reference constructor, assert() before it is (eventually) too late!
Text files modified:
trunk/boost/dynamic_bitset/dynamic_bitset.hpp | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
Modified: trunk/boost/dynamic_bitset/dynamic_bitset.hpp
==============================================================================
--- trunk/boost/dynamic_bitset/dynamic_bitset.hpp (original)
+++ trunk/boost/dynamic_bitset/dynamic_bitset.hpp 2008-09-11 05:46:54 EDT (Thu, 11 Sep 2008)
@@ -81,8 +81,11 @@
// the one and only non-copy ctor
reference(block_type & b, block_type pos)
- :m_block(b), m_mask(block_type(1) << pos)
- { assert( pos < bits_per_block); }
+ :m_block(b),
+ m_mask( (assert(pos < bits_per_block),
+ block_type(1) << pos )
+ )
+ { }
void operator&(); // left undefined
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