title: Concatenate boost::dynamic_bitset or std::bitset
body: <p>what is the best way to concatenate 2 bitsets?</p>
  
  <p>For example i've got</p>
  
  <pre><code>boost::dynamic_bitset&lt;&gt; test1( std::string("1111") );
  boost::dynamic_bitset&lt;&gt; test2( std::string("00") );
  </code></pre>
  
  <p>they should be concatenated into a thrid Bitset test3 which then holds</p>
  
  <pre><code>111100 
  </code></pre>
  
  <p>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.</p>
  
  <p>UPDATE:
  I've compared both methods (stringmethod from me and Neil and shiftmethod from messenger) and the stringmethod was a lot faster (factor 10++). Code here:
  <a href="http://pastebin.com/HfpfYfy8" rel="noreferrer">http://pastebin.com/HfpfYfy8</a></p>
  
  <p>I hope Pastebin is ok for posting long code-listings. If there is a better way please contact me.</p>