|
Bit Logic > functions > concat_bits
concat_bits
Syntax:
#include <boost/bit_logic/functions.hpp> bit_vector <> concat_bits ( BitTypeT const & upper_bits, BitTypeT const & lower_bits ) ;ß Returns a bit_vector which is the concatenation of two Bit Types. The length is the sum of the lengths of the two bit types. bit_vector<> small ( 4 ) ; small = "0110" ; uint8_t bigger = 0x5a ; uint16_t zeros = 0 ; cout << concat_bits ( bigger, small ) << endl ; cout << concat_bits ( zeros, bigger ) << endl ; This code produces the output: 010110100110 This code throws no exceptions. |