Bit Logic > functions > repeat_bits
repeat_bits
Syntax:
 #include <boost/bit_logic/functions.hpp>
 bit_vector <> repeat_bits ( BitTypeT & value, std::size_t count ) ;

Returns a bit_vector which is a Bit Type value repeated count number of times.

  bit_vector<> small ( 4 ) ;
  small = "0110" ; 					  
  cout << hex << repeat_bits ( small, 3 ) << endl ;

This code would produce this output:

  011001100110

This code throws no exceptions.