[#absl-InlinedVector-2constructor-05] = xref:absl.adoc[absl]::xref:absl/InlinedVector.adoc[InlinedVector]::InlinedVector :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<absl/container/inlined_vector.h>` Creates an empty inlined vector with a value‐initialized allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/InlinedVector/2constructor-0f4.adoc[InlinedVector]() noexcept(noexcept(allocator_type())); ---- [.small]#xref:absl/InlinedVector/2constructor-0f4.adoc[_» more..._]# Creates an inlined vector by copying the contents of `other` using `other`'s allocator. [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..._]# Creates an inlined vector by moving in the contents of `other` without allocating. If `other` contains allocated memory, the newly‐created inlined vector will take ownership of that memory. However, if `other` does not contain allocated memory, the newly‐created inlined vector will perform element‐wise move construction of the contents of `other`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/InlinedVector/2constructor-0a.adoc[InlinedVector](xref:absl/InlinedVector.adoc[InlinedVector]&& other) noexcept(/* see-below */); ---- [.small]#xref:absl/InlinedVector/2constructor-0a.adoc[_» more..._]# Creates an empty inlined vector with a copy of `allocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:absl/InlinedVector/2constructor-046.adoc[InlinedVector](xref:absl/InlinedVector/allocator_type.adoc[allocator_type] const& allocator) noexcept; ---- [.small]#xref:absl/InlinedVector/2constructor-046.adoc[_» more..._]# Creates an inlined vector with `n` copies of `value_type()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:absl/InlinedVector/2constructor-08.adoc[InlinedVector]( xref:absl/InlinedVector/size_type.adoc[size_type] n, xref:absl/InlinedVector/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:absl/InlinedVector/2constructor-08.adoc[_» more..._]# Creates an inlined vector with copies of the elements of `list`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/InlinedVector/2constructor-00.adoc[InlinedVector]( std::initializer_list<value_type> list, xref:absl/InlinedVector/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:absl/InlinedVector/2constructor-00.adoc[_» more..._]# Creates an inlined vector by copying the contents of `other` using the provided `allocator`. [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_type] const& allocator); ---- [.small]#xref:absl/InlinedVector/2constructor-03.adoc[_» more..._]# Creates an inlined vector by moving in the contents of `other` with a copy of `allocator`. [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_type] const& allocator) noexcept(/* see-below */); ---- [.small]#xref:absl/InlinedVector/2constructor-01.adoc[_» more..._]# Creates an inlined vector with `n` copies of `v`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/InlinedVector/2constructor-02.adoc[InlinedVector]( xref:absl/InlinedVector/size_type.adoc[size_type] n, xref:absl/InlinedVector/const_reference.adoc[const_reference] v, xref:absl/InlinedVector/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:absl/InlinedVector/2constructor-02.adoc[_» more..._]# Creates an inlined vector with elements constructed from the provided forward iterator range [`first`, `last`).] [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename ForwardIterator, xref:absl/InlinedVector.adoc[EnableIfAtLeastForwardIterator<ForwardIterator>] = 0> xref:absl/InlinedVector/2constructor-0ff.adoc[InlinedVector]( ForwardIterator first, ForwardIterator last, xref:absl/InlinedVector/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:absl/InlinedVector/2constructor-0ff.adoc[_» more..._]# Creates an inlined vector with elements constructed from the provided input iterator range [`first`, `last`).] [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputIterator, xref:absl/InlinedVector.adoc[DisableIfAtLeastForwardIterator<InputIterator>] = 0> xref:absl/InlinedVector/2constructor-048.adoc[InlinedVector]( InputIterator first, InputIterator last, xref:absl/InlinedVector/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:absl/InlinedVector/2constructor-048.adoc[_» more..._]# Creates an inlined vector with elements constructed from the provided input iterator range [`first`, `last`).] [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputIterator, xref:absl/InlinedVector.adoc[DisableIfAtLeastForwardIterator<InputIterator>] = 0> xref:absl/InlinedVector/2constructor-0d9.adoc[InlinedVector]( InputIterator first, InputIterator last, xref:absl/InlinedVector/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:absl/InlinedVector/2constructor-0d9.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *other* | The inlined vector to copy. | *allocator* | The allocator to copy. | *n* | The number of elements to create. | *list* | The initializer list to copy elements from. | *v* | The value to copy into each element. | *first* | An iterator to the beginning of the range. | *last* | An iterator past the end of the range. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#