93 lines
2.8 KiB
Markdown
93 lines
2.8 KiB
Markdown
[inplace.vector.cons]
|
||
|
||
# 23 Containers library [[containers]](./#containers)
|
||
|
||
## 23.3 Sequence containers [[sequences]](sequences#inplace.vector.cons)
|
||
|
||
### 23.3.16 Class template inplace_vector [[inplace.vector]](inplace.vector#cons)
|
||
|
||
#### 23.3.16.2 Constructors [inplace.vector.cons]
|
||
|
||
[ð](#lib:inplace_vector,constructor)
|
||
|
||
`constexpr explicit inplace_vector(size_type n);
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L10926)
|
||
|
||
*Preconditions*: T is *Cpp17DefaultInsertable* into inplace_vector[.](#1.sentence-1)
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L10930)
|
||
|
||
*Effects*: Constructs an inplace_vector with n default-inserted elements[.](#2.sentence-1)
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L10934)
|
||
|
||
*Complexity*: Linear in n[.](#3.sentence-1)
|
||
|
||
[ð](#lib:inplace_vector,constructor_)
|
||
|
||
`constexpr inplace_vector(size_type n, const T& value);
|
||
`
|
||
|
||
[4](#4)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L10945)
|
||
|
||
*Preconditions*: T is *Cpp17CopyInsertable* into inplace_vector[.](#4.sentence-1)
|
||
|
||
[5](#5)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L10949)
|
||
|
||
*Effects*: Constructs an inplace_vector with n copies of value[.](#5.sentence-1)
|
||
|
||
[6](#6)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L10953)
|
||
|
||
*Complexity*: Linear in n[.](#6.sentence-1)
|
||
|
||
[ð](#lib:inplace_vector,constructor__)
|
||
|
||
`template<class InputIterator>
|
||
constexpr inplace_vector(InputIterator first, InputIterator last);
|
||
`
|
||
|
||
[7](#7)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L10965)
|
||
|
||
*Effects*: Constructs an inplace_vector equal to the range [first, last)[.](#7.sentence-1)
|
||
|
||
[8](#8)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L10969)
|
||
|
||
*Complexity*: Linear in distance(first, last)[.](#8.sentence-1)
|
||
|
||
[ð](#lib:inplace_vector,constructor___)
|
||
|
||
`template<[container-compatible-range](container.intro.reqmts#concept:container-compatible-range "23.2.2.1 Introduction [container.intro.reqmts]")<T> R>
|
||
constexpr inplace_vector(from_range_t, R&& rg);
|
||
`
|
||
|
||
[9](#9)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L10981)
|
||
|
||
*Effects*: Constructs an inplace_vector with
|
||
the elements of the range rg[.](#9.sentence-1)
|
||
|
||
[10](#10)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L10986)
|
||
|
||
*Complexity*: Linear in ranges::distance(rg)[.](#10.sentence-1)
|