Change the size of this vector to the specified newSize. If newSize < size(), the elements in the range [newSize .. size())] are erased, and this function does not throw. If newSize > size(), the (newly created) elements in the range [size() .. newSize)] are default‐constructed value_type objects, and if an exception is thrown (other than by the move constructor of a non‐copy‐insertable value_type), *this is unaffected. Throw std::length_error if newSize > max_size(). This method requires that the (template parameter) type VALUE_TYPE be default‐insertable and move‐insertable into this vector (see {Requirements on VALUE_TYPE}).
Synopsis
Declared in <bslstl_vector.h>
void
resize(size_type newSize);
Created with MrDocs