|
assign
Syntax:
#include <boost/bit_logic/bit_vector.hpp> void assign ( size_type num, bool val ); void assign ( input_iterator start, input_iterator end ) ; The assign function assigns every element within a bit_vector, and it will destroy the previous contents of the bit_vector. The first operator will resize the bit_vector to num bit elements each with the value val For example: bit_vector<> v ( 16 , true ) ; v.assign ( 4, false ); The above code creates a bit_vector v of size 16, with all bits set to true. the assign function then resizes the vector to 4 and sets all the values to false. |