Construct a vector with the specified elements.
Synopsis
Declared in <util/vector.h>
template<typename... Args>
std::vector<std::common_type_t<Args...>>
Vector(Args&&... args);
Description
This is preferable over the list initializing constructor of std::vector:
-
It automatically infers the element type from its arguments.
-
If any arguments are rvalue references, they will be moved into the vector (list initialization always copies).
Return Value
A vector whose element type is the common type of the arguments.
Parameters
Name |
Description |
args |
The elements to place into the vector, in order. |
Created with MrDocs