Concatenate boost::dynamic_bitset or std::bitset
Posted
by MOnsDaR
on Stack Overflow
See other posts from Stack Overflow
or by MOnsDaR
Published on 2010-06-17T12:50:55Z
Indexed on
2010/06/17
12:53 UTC
Read the original article
Hit count: 539
Hey,
what is the best way to concatenate 2 bitsets?
For example i've got
boost::dynamic_bitset<> test1( std::string("1111") );
boost::dynamic_bitset<> test2( std::string("00") );
they should be concatenated into a thrid Bitset test3 which then holds
111100
Solutions should use boost::dynamic_bitset. If the solution works with std::bitset, it would be nice too. There should be a focus on performance when concatenating the bits.
© Stack Overflow or respective owner