insert

  iterator insert(iterator position, bool x);
  

Inserts x into the bitvector at position. All elements in the range [position, end()) are moved down to make room for x. The returned iterator refers to the newly inserted element having value x.

Precondition: position is an iterator into this bitvector.

Postcondition: If an exception is not thrown, size() is increased by one and *returned_iterator == x.

If an exception is thrown, there are no effects.

  void insert(iterator position, size_type n, bool x);
  

Inserts n copies of x into the bitvector at position. All elements in the range [position, end()) are moved down to make room for the newly inserted elements.

Precondition: position is an iterator into this bitvector.

Postcondition: If an exception is not thrown, size() is increased by n. The range [position, position+n) will all have value x.

If an exception is thrown, there are no effects.

  template <class InputIterator>
      void insert(iterator position, InputIterator first, 
  InputIterator last);
  

Inserts the range [first, last) into the bitvector at position. All elements in the range [position, end()) are moved down to make room for the newly inserted elements.

Precondition: position is an iterator into this bitvector. first and last are not iterators into this bitvector.

Postcondition: If an exception is not thrown, size() is increased by distance(first, last).

If an exception is thrown other than by operations on InputIterator, there are no effects.