[#prevector-0c-assign-084]
= xref:prevector-0c.adoc[prevector]::assign
:relfileprefix: ../
:mrdocs:

`assign` overloads

== Synopses

Declared in `&lt;prevector&period;h&gt;`

Replaces the contents with `n` copies of `val`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:prevector-0c/assign-0a.adoc[assign](
    xref:prevector-0c/size_type.adoc[size&lowbar;type] n,
    T const& val);
----

[.small]#xref:prevector-0c/assign-0a.adoc[_» more&period;&period;&period;_]#

Replaces the contents with copies of the elements in the range &lsqb;first, last)&period;&rsqb;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;std::input&lowbar;iterator InputIterator&gt;
void
xref:prevector-0c/assign-088.adoc[assign](
    InputIterator first,
    InputIterator last);
----

[.small]#xref:prevector-0c/assign-088.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *n*
| The number of copies to store&period;
| *val*
| The value to copy into each element&period;
| *first*
| Iterator to the first element to copy&period;
| *last*
| Iterator one past the last element to copy&period;
|===


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