[#absl-InlinedVector-2constructor-05]
= xref:absl.adoc[absl]::xref:absl/InlinedVector.adoc[InlinedVector]::InlinedVector
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;absl&sol;container&sol;inlined&lowbar;vector&period;h&gt;`

Creates an empty inlined vector with a value&hyphen;initialized allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/InlinedVector/2constructor-0f4.adoc[InlinedVector]() noexcept(noexcept(allocator&lowbar;type()));
----

[.small]#xref:absl/InlinedVector/2constructor-0f4.adoc[_» more&period;&period;&period;_]#

Creates an inlined vector by copying the contents of `other` using `other`&apos;s allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/InlinedVector/2constructor-0d2.adoc[InlinedVector](xref:absl/InlinedVector.adoc[InlinedVector] const& other);
----

[.small]#xref:absl/InlinedVector/2constructor-0d2.adoc[_» more&period;&period;&period;_]#

Creates an inlined vector by moving in the contents of `other` without allocating&period; If `other` contains allocated memory, the newly&hyphen;created inlined vector will take ownership of that memory&period; However, if `other` does not contain allocated memory, the newly&hyphen;created inlined vector will perform element&hyphen;wise move construction of the contents of `other`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/InlinedVector/2constructor-0a.adoc[InlinedVector](xref:absl/InlinedVector.adoc[InlinedVector]&& other) noexcept(&sol;&ast; see-below &ast;&sol;);
----

[.small]#xref:absl/InlinedVector/2constructor-0a.adoc[_» more&period;&period;&period;_]#

Creates an empty inlined vector with a copy of `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:absl/InlinedVector/2constructor-046.adoc[InlinedVector](xref:absl/InlinedVector/allocator_type.adoc[allocator&lowbar;type] const& allocator) noexcept;
----

[.small]#xref:absl/InlinedVector/2constructor-046.adoc[_» more&period;&period;&period;_]#

Creates an inlined vector with `n` copies of `value&lowbar;type()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:absl/InlinedVector/2constructor-08.adoc[InlinedVector](
    xref:absl/InlinedVector/size_type.adoc[size&lowbar;type] n,
    xref:absl/InlinedVector/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:absl/InlinedVector/2constructor-08.adoc[_» more&period;&period;&period;_]#

Creates an inlined vector with copies of the elements of `list`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/InlinedVector/2constructor-00.adoc[InlinedVector](
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; list,
    xref:absl/InlinedVector/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:absl/InlinedVector/2constructor-00.adoc[_» more&period;&period;&period;_]#

Creates an inlined vector by copying the contents of `other` using the provided `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/InlinedVector/2constructor-03.adoc[InlinedVector](
    xref:absl/InlinedVector.adoc[InlinedVector] const& other,
    xref:absl/InlinedVector/allocator_type.adoc[allocator&lowbar;type] const& allocator);
----

[.small]#xref:absl/InlinedVector/2constructor-03.adoc[_» more&period;&period;&period;_]#

Creates an inlined vector by moving in the contents of `other` with a copy of `allocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/InlinedVector/2constructor-01.adoc[InlinedVector](
    xref:absl/InlinedVector.adoc[InlinedVector]&& other,
    xref:absl/InlinedVector/allocator_type.adoc[allocator&lowbar;type] const& allocator) noexcept(&sol;&ast; see-below &ast;&sol;);
----

[.small]#xref:absl/InlinedVector/2constructor-01.adoc[_» more&period;&period;&period;_]#

Creates an inlined vector with `n` copies of `v`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/InlinedVector/2constructor-02.adoc[InlinedVector](
    xref:absl/InlinedVector/size_type.adoc[size&lowbar;type] n,
    xref:absl/InlinedVector/const_reference.adoc[const&lowbar;reference] v,
    xref:absl/InlinedVector/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:absl/InlinedVector/2constructor-02.adoc[_» more&period;&period;&period;_]#

Creates an inlined vector with elements constructed from the provided forward iterator range &lsqb;`first`, `last`)&period;&rsqb;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename ForwardIterator,
    xref:absl/InlinedVector.adoc[EnableIfAtLeastForwardIterator&lt;ForwardIterator&gt;] = 0&gt;
xref:absl/InlinedVector/2constructor-0ff.adoc[InlinedVector](
    ForwardIterator first,
    ForwardIterator last,
    xref:absl/InlinedVector/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:absl/InlinedVector/2constructor-0ff.adoc[_» more&period;&period;&period;_]#

Creates an inlined vector with elements constructed from the provided input iterator range &lsqb;`first`, `last`)&period;&rsqb;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename InputIterator,
    xref:absl/InlinedVector.adoc[DisableIfAtLeastForwardIterator&lt;InputIterator&gt;] = 0&gt;
xref:absl/InlinedVector/2constructor-048.adoc[InlinedVector](
    InputIterator first,
    InputIterator last,
    xref:absl/InlinedVector/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:absl/InlinedVector/2constructor-048.adoc[_» more&period;&period;&period;_]#

Creates an inlined vector with elements constructed from the provided input iterator range &lsqb;`first`, `last`)&period;&rsqb;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename InputIterator,
    xref:absl/InlinedVector.adoc[DisableIfAtLeastForwardIterator&lt;InputIterator&gt;] = 0&gt;
xref:absl/InlinedVector/2constructor-0d9.adoc[InlinedVector](
    InputIterator first,
    InputIterator last,
    xref:absl/InlinedVector/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:absl/InlinedVector/2constructor-0d9.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| The inlined vector to copy&period;
| *allocator*
| The allocator to copy&period;
| *n*
| The number of elements to create&period;
| *list*
| The initializer list to copy elements from&period;
| *v*
| The value to copy into each element&period;
| *first*
| An iterator to the beginning of the range&period;
| *last*
| An iterator past the end of the range&period;
|===


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