id summary reporter owner description type status milestone component version severity resolution keywords cc 12169 error when copying blocks into a dynamic_bitset with size() not an integral number of bits_per_block Diab Jerius jsiek "Hi, I'm trying to initialize a dynamic_bitset from a vector of blocks. Here's the code: {{{ #include #include #include typedef boost::dynamic_bitset BitSet; typedef std::vector Block; int main(int argc, char* argv[]) { int nbits = atoi( argv[1] ); BitSet bits( nbits ); Block buffer; buffer.resize( bits.num_blocks(), 0xff ); boost::from_block_range(buffer.begin(),buffer.end(), bits ); return 0; } }}} If the bitset size isn't a multiple of sizeof(unsigned char) (here 8), an assert() in ~dynamic_bitset() fails and the process is aborted. For example: {{{ % ./a.out 1 a.out: boost-1.60.0/include/boost/dynamic_bitset/dynamic_bitset.hpp:633: ost::dynamic_bitset::~dynamic_bitset() [with Block = unsigned char; Allocator = std::allocator]: Assertion `m_check_invariants()' failed. Aborted % ./a.out 8 % ./a.out 15 a.out: boost-1.60.0/boost/dynamic_bitset/dynamic_bitset.hpp:633: ost::dynamic_bitset::~dynamic_bitset() [with Block = unsigned char; Allocator = std::allocator]: Assertion `m_check_invariants()' failed. Aborted % ./a.out 16 % }}} I see this with 1.59 & 1.60 using either g++ 4.7.2 or Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) Thanks, Diab " Bugs new To Be Determined dynamic_bitset Boost 1.61.0 Problem