[#Vector]
= Vector
:mrdocs:

Construct a vector with the specified elements&period;

== Synopsis

Declared in `&lt;util&sol;vector&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename&period;&period;&period; Args&gt;
std::vector&lt;std::common&lowbar;type&lowbar;t&lt;Args&period;&period;&period;&gt;&gt;
Vector(Args&&&period;&period;&period; args);
----

== Description

This is preferable over the list initializing constructor of std&colon;&colon;vector&colon;

* It automatically infers the element type from its arguments&period;
* If any arguments are rvalue references, they will be moved into the vector (list initialization always copies)&period;

== Return Value

A vector whose element type is the common type of the arguments&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *args*
| The elements to place into the vector, in order&period;
|===


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