|
bit_vector Constructors
Syntax:
#include <boost/bit_logic/bit_vector.hpp> bit_vector ( ) ; bit_vector ( const bit_vector & c ) ; bit_vector ( size_type num, bool val = false ); bit_vector ( input_iterator start, input_iterator end ) ; ~bit_vector ( ) ; Template Arguments :
The default bit_vector construct a 0 length bit_vector. The copy constructor duplicates the original size and contents of the copied vector The sized constructor For example: bit_vector<> simple (16); cout << simple << endl ; This code would produce this output: 0000000000000000 Now creating a bit_vector with values defaulted to all 1's. bit_vector<> bv2 (16, true); cout << simple << endl ; This code would produce this output: 1111111111111111 |