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

`assign` overloads

== Synopses

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

Assign to this object the value resulting from first clearing this vector and then inserting (in order) each `VALUE&lowbar;TYPE` object in the specified `values` initializer list&period; If an exception is thrown, `&ast;this` is left in a valid but unspecified state&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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/vector-0ea/assign-0fb.adoc[assign](std::initializer&lowbar;list&lt;double&gt; values);
----

[.small]#xref:bsl/vector-0ea/assign-0fb.adoc[_» more&period;&period;&period;_]#

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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/vector-0ea/assign-0fe.adoc[assign](
    xref:bsl/vector-0ea/size_type.adoc[size&lowbar;type] numElements,
    double const& value);
----

[.small]#xref:bsl/vector-0ea/assign-0fe.adoc[_» more&period;&period;&period;_]#

Assign to this object the value resulting from first clearing this vector and then inserting (in order) each `value&lowbar;type` object in the range starting at the specified `first` element, and ending immediately before the specified `last` element&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 `distance(first,last) &gt; max&lowbar;size()`&period; The (template parameter) type `INPUT&lowbar;ITER` shall meet the requirements of an input iterator defined in the C&plus;&plus;11 standard &lsqb;24&period;2&period;3&rsqb; providing access to values of a type convertible to `value&lowbar;type`, and `value&lowbar;type` must be `emplace&hyphen;constructible` from `&ast;i` into this vector, where `i` is a dereferenceable iterator in the range `&lsqb;first &period;&period; last)&rsqb;` (see &lcub;Requirements on `VALUE&lowbar;TYPE`&rcub;)&period; The behavior is undefined unless `first` and `last` refer to a range of valid values where `first` is at a position at or before `last`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITER&gt;
void
xref:bsl/vector-0ea/assign-08.adoc[assign](
    INPUT&lowbar;ITER first,
    INPUT&lowbar;ITER last);
----

[.small]#xref:bsl/vector-0ea/assign-08.adoc[_» more&period;&period;&period;_]#


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