[#bsl-vector-095-resize-0d] = xref:bsl.adoc[bsl]::xref:bsl/vector-095.adoc[vector<char>]::resize :relfileprefix: ../../ :mrdocs: `resize` overloads == Synopses Declared in `<bslstl_vector.h>` 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`}). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:bsl/vector-095/resize-0f.adoc[resize](xref:bsl/vector-095/size_type.adoc[size_type] newSize); ---- [.small]#xref:bsl/vector-095/resize-0f.adoc[_» more..._]# Change the size of this vector to the specified `newSize`, inserting `newSize ‐ size()` copies of the specified `value` at the end of this vector if `newSize > size()`. If `newSize < size()`, the elements in the range `[newSize .. size())]` are erased, `value` is ignored, and this method does not throw. If `newSize > size()` and an exception is thrown, `*this` is unaffected. Throw `std::length_error` if `newSize > max_size()`. This method requires that the (template parameter) type `VALUE_TYPE` be `copy‐insertable` into this vector (see {Requirements on `VALUE_TYPE`}). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:bsl/vector-095/resize-0a.adoc[resize]( xref:bsl/vector-095/size_type.adoc[size_type] newSize, char const& value); ---- [.small]#xref:bsl/vector-095/resize-0a.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#