[#bsl-vector-0ea-assign-0fe]
= xref:bsl.adoc[bsl]::xref:bsl/vector-0ea.adoc[vector&lt;double&gt;]::assign
:relfileprefix: ../../
:mrdocs:

Assign to this object the value resulting from first clearing this vector and then inserting the specified `numElements` copies of the specified `value`&period; If an exception is thrown, `&ast;this` is left in a valid but unspecified state&period; Throw `std&colon;&colon;length&lowbar;error` if `numElements &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
assign(
    xref:bsl/vector-0ea/size_type.adoc[size&lowbar;type] numElements,
    double const& value);
----


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