[#bsl-vector-027-resize-08]
= xref:bsl.adoc[bsl]::xref:bsl/vector-027.adoc[vector&lt;MetricSampleGroup&gt;]::resize
:relfileprefix: ../../
:mrdocs:

Change the size of this vector to the specified `newSize`, inserting `newSize &hyphen; size()` copies of the specified `value` at the end of this vector if `newSize &gt; size()`&period; If `newSize &lt; size()`, the elements in the range `&lsqb;newSize &period;&period; size())&rsqb;` are erased, `value` is ignored, and this method does not throw&period; If `newSize &gt; size()` and an exception is thrown, `&ast;this` is unaffected&period; Throw `std&colon;&colon;length&lowbar;error` if `newSize &gt; max&lowbar;size()`&period; This method requires that the (template parameter) type `VALUE&lowbar;TYPE` be `copy&hyphen;insertable` into this vector (see &lcub;Requirements on `VALUE&lowbar;TYPE`&rcub;)&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;vector&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
resize(
    xref:bsl/vector-027/size_type.adoc[size&lowbar;type] newSize,
    xref:BloombergLP/balm/MetricSampleGroup.adoc[MetricSampleGroup] const& value);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
