Init
This commit is contained in:
67
cppdraft/uninitialized/construct/default.md
Normal file
67
cppdraft/uninitialized/construct/default.md
Normal file
@@ -0,0 +1,67 @@
|
||||
[uninitialized.construct.default]
|
||||
|
||||
# 26 Algorithms library [[algorithms]](./#algorithms)
|
||||
|
||||
## 26.11 Specialized <memory> algorithms [[specialized.algorithms]](specialized.algorithms#uninitialized.construct.default)
|
||||
|
||||
### 26.11.3 uninitialized_default_construct [uninitialized.construct.default]
|
||||
|
||||
[ð](#lib:uninitialized_default_construct)
|
||||
|
||||
`template<class NoThrowForwardIterator>
|
||||
constexpr void uninitialized_default_construct(NoThrowForwardIterator first,
|
||||
NoThrowForwardIterator last);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13718)
|
||||
|
||||
*Effects*: Equivalent to:for (; first != last; ++first)::new (*voidify*(*first))typename iterator_traits<NoThrowForwardIterator>::value_type;
|
||||
|
||||
[ð](#lib:uninitialized_default_construct_)
|
||||
|
||||
`namespace ranges {
|
||||
template<[nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [nothrow-sentinel-for](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S>
|
||||
requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_initializable [concept.default.init]")<iter_value_t<I>>
|
||||
constexpr I uninitialized_default_construct(I first, S last);
|
||||
template<[nothrow-forward-range](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") R>
|
||||
requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_initializable [concept.default.init]")<range_value_t<R>>
|
||||
constexpr borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
|
||||
}
|
||||
`
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13741)
|
||||
|
||||
*Effects*: Equivalent to:for (; first != last; ++first)::new (*voidify*(*first)) remove_reference_t<iter_reference_t<I>>;return first;
|
||||
|
||||
[ð](#lib:uninitialized_default_construct_n)
|
||||
|
||||
`template<class NoThrowForwardIterator, class Size>
|
||||
constexpr NoThrowForwardIterator
|
||||
uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
|
||||
`
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13759)
|
||||
|
||||
*Effects*: Equivalent to:for (; n > 0; (void)++first, --n)::new (*voidify*(*first))typename iterator_traits<NoThrowForwardIterator>::value_type;return first;
|
||||
|
||||
[ð](#lib:uninitialized_default_construct_n_)
|
||||
|
||||
`namespace ranges {
|
||||
template<[nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I>
|
||||
requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_initializable [concept.default.init]")<iter_value_t<I>>
|
||||
constexpr I uninitialized_default_construct_n(I first, iter_difference_t<I> n);
|
||||
}
|
||||
`
|
||||
|
||||
[4](#4)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13780)
|
||||
|
||||
*Effects*: Equivalent to:return uninitialized_default_construct(counted_iterator(first, n),
|
||||
default_sentinel).base();
|
||||
67
cppdraft/uninitialized/construct/value.md
Normal file
67
cppdraft/uninitialized/construct/value.md
Normal file
@@ -0,0 +1,67 @@
|
||||
[uninitialized.construct.value]
|
||||
|
||||
# 26 Algorithms library [[algorithms]](./#algorithms)
|
||||
|
||||
## 26.11 Specialized <memory> algorithms [[specialized.algorithms]](specialized.algorithms#uninitialized.construct.value)
|
||||
|
||||
### 26.11.4 uninitialized_value_construct [uninitialized.construct.value]
|
||||
|
||||
[ð](#lib:uninitialized_value_construct)
|
||||
|
||||
`template<class NoThrowForwardIterator>
|
||||
constexpr void uninitialized_value_construct(NoThrowForwardIterator first,
|
||||
NoThrowForwardIterator last);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13799)
|
||||
|
||||
*Effects*: Equivalent to:for (; first != last; ++first)::new (*voidify*(*first))typename iterator_traits<NoThrowForwardIterator>::value_type();
|
||||
|
||||
[ð](#lib:uninitialized_value_construct_)
|
||||
|
||||
`namespace ranges {
|
||||
template<[nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [nothrow-sentinel-for](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S>
|
||||
requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_initializable [concept.default.init]")<iter_value_t<I>>
|
||||
constexpr I uninitialized_value_construct(I first, S last);
|
||||
template<[nothrow-forward-range](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") R>
|
||||
requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_initializable [concept.default.init]")<range_value_t<R>>
|
||||
constexpr borrowed_iterator_t<R> uninitialized_value_construct(R&& r);
|
||||
}
|
||||
`
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13822)
|
||||
|
||||
*Effects*: Equivalent to:for (; first != last; ++first)::new (*voidify*(*first)) remove_reference_t<iter_reference_t<I>>();return first;
|
||||
|
||||
[ð](#lib:uninitialized_value_construct_n)
|
||||
|
||||
`template<class NoThrowForwardIterator, class Size>
|
||||
constexpr NoThrowForwardIterator
|
||||
uninitialized_value_construct_n(NoThrowForwardIterator first, Size n);
|
||||
`
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13840)
|
||||
|
||||
*Effects*: Equivalent to:for (; n > 0; (void)++first, --n)::new (*voidify*(*first))typename iterator_traits<NoThrowForwardIterator>::value_type();return first;
|
||||
|
||||
[ð](#lib:uninitialized_value_construct_n_)
|
||||
|
||||
`namespace ranges {
|
||||
template<[nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I>
|
||||
requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_initializable [concept.default.init]")<iter_value_t<I>>
|
||||
constexpr I uninitialized_value_construct_n(I first, iter_difference_t<I> n);
|
||||
}
|
||||
`
|
||||
|
||||
[4](#4)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13861)
|
||||
|
||||
*Effects*: Equivalent to:return uninitialized_value_construct(counted_iterator(first, n),
|
||||
default_sentinel).base();
|
||||
107
cppdraft/uninitialized/copy.md
Normal file
107
cppdraft/uninitialized/copy.md
Normal file
@@ -0,0 +1,107 @@
|
||||
[uninitialized.copy]
|
||||
|
||||
# 26 Algorithms library [[algorithms]](./#algorithms)
|
||||
|
||||
## 26.11 Specialized <memory> algorithms [[specialized.algorithms]](specialized.algorithms#uninitialized.copy)
|
||||
|
||||
### 26.11.5 uninitialized_copy [uninitialized.copy]
|
||||
|
||||
[ð](#lib:uninitialized_copy)
|
||||
|
||||
`template<class InputIterator, class NoThrowForwardIterator>
|
||||
constexpr NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
|
||||
NoThrowForwardIterator result);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13880)
|
||||
|
||||
*Preconditions*: result+[0, (last - first)) does not overlap with [first, last)[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13884)
|
||||
|
||||
*Effects*: Equivalent to:for (; first != last; ++result, (void)++first)::new (*voidify*(*result))typename iterator_traits<NoThrowForwardIterator>::value_type(*first);
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13893)
|
||||
|
||||
*Returns*: result[.](#3.sentence-1)
|
||||
|
||||
[ð](#lib:uninitialized_copy_)
|
||||
|
||||
`namespace ranges {
|
||||
template<[input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_iterator [iterator.concept.input]") I, [sentinel_for](iterator.concept.sentinel#concept:sentinel_for "24.3.4.7 Concept sentinel_for [iterator.concept.sentinel]")<I> S1,
|
||||
[nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [nothrow-sentinel-for](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S2>
|
||||
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<iter_value_t<O>, iter_reference_t<I>>
|
||||
constexpr uninitialized_copy_result<I, O>
|
||||
uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast);
|
||||
template<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") IR, [nothrow-forward-range](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") OR>
|
||||
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<range_value_t<OR>, range_reference_t<IR>>
|
||||
constexpr uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
|
||||
uninitialized_copy(IR&& in_range, OR&& out_range);
|
||||
}
|
||||
`
|
||||
|
||||
[4](#4)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13914)
|
||||
|
||||
*Preconditions*: [ofirst, olast) does not overlap with [ifirst, ilast)[.](#4.sentence-1)
|
||||
|
||||
[5](#5)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13918)
|
||||
|
||||
*Effects*: Equivalent to:for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)::new (*voidify*(*ofirst)) remove_reference_t<iter_reference_t<O>>(*ifirst);return {std::move(ifirst), ofirst};
|
||||
|
||||
[ð](#lib:uninitialized_copy_n)
|
||||
|
||||
`template<class InputIterator, class Size, class NoThrowForwardIterator>
|
||||
constexpr NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
|
||||
NoThrowForwardIterator result);
|
||||
`
|
||||
|
||||
[6](#6)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13936)
|
||||
|
||||
*Preconditions*: result+[0, n) does not overlap with first+[0, n)[.](#6.sentence-1)
|
||||
|
||||
[7](#7)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13940)
|
||||
|
||||
*Effects*: Equivalent to:for (; n > 0; ++result, (void)++first, --n)::new (*voidify*(*result))typename iterator_traits<NoThrowForwardIterator>::value_type(*first);
|
||||
|
||||
[8](#8)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13949)
|
||||
|
||||
*Returns*: result[.](#8.sentence-1)
|
||||
|
||||
[ð](#lib:uninitialized_copy_n_)
|
||||
|
||||
`namespace ranges {
|
||||
template<[input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_iterator [iterator.concept.input]") I, [nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [nothrow-sentinel-for](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S>
|
||||
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<iter_value_t<O>, iter_reference_t<I>>
|
||||
constexpr uninitialized_copy_n_result<I, O>
|
||||
uninitialized_copy_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
|
||||
}
|
||||
`
|
||||
|
||||
[9](#9)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13965)
|
||||
|
||||
*Preconditions*: [ofirst, olast) does not overlap withifirst+[0, n)[.](#9.sentence-1)
|
||||
|
||||
[10](#10)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13970)
|
||||
|
||||
*Effects*: Equivalent to:auto t = uninitialized_copy(counted_iterator(std::move(ifirst), n),
|
||||
default_sentinel, ofirst, olast);return {std::move(t.in).base(), t.out};
|
||||
66
cppdraft/uninitialized/fill.md
Normal file
66
cppdraft/uninitialized/fill.md
Normal file
@@ -0,0 +1,66 @@
|
||||
[uninitialized.fill]
|
||||
|
||||
# 26 Algorithms library [[algorithms]](./#algorithms)
|
||||
|
||||
## 26.11 Specialized <memory> algorithms [[specialized.algorithms]](specialized.algorithms#uninitialized.fill)
|
||||
|
||||
### 26.11.7 uninitialized_fill [uninitialized.fill]
|
||||
|
||||
[ð](#lib:uninitialized_fill)
|
||||
|
||||
`template<class NoThrowForwardIterator, class T>
|
||||
constexpr void uninitialized_fill(NoThrowForwardIterator first,
|
||||
NoThrowForwardIterator last, const T& x);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14107)
|
||||
|
||||
*Effects*: Equivalent to:for (; first != last; ++first)::new (*voidify*(*first))typename iterator_traits<NoThrowForwardIterator>::value_type(x);
|
||||
|
||||
[ð](#lib:uninitialized_fill_)
|
||||
|
||||
`namespace ranges {
|
||||
template<[nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [nothrow-sentinel-for](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S, class T>
|
||||
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<iter_value_t<I>, const T&>
|
||||
constexpr I uninitialized_fill(I first, S last, const T& x);
|
||||
template<[nothrow-forward-range](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") R, class T>
|
||||
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<range_value_t<R>, const T&>
|
||||
constexpr borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x);
|
||||
}
|
||||
`
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14130)
|
||||
|
||||
*Effects*: Equivalent to:for (; first != last; ++first)::new (*voidify*(*first)) remove_reference_t<iter_reference_t<I>>(x);return first;
|
||||
|
||||
[ð](#lib:uninitialized_fill_n)
|
||||
|
||||
`template<class NoThrowForwardIterator, class Size, class T>
|
||||
constexpr NoThrowForwardIterator
|
||||
uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x);
|
||||
`
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14148)
|
||||
|
||||
*Effects*: Equivalent to:for (; n--; ++first)::new (*voidify*(*first))typename iterator_traits<NoThrowForwardIterator>::value_type(x);return first;
|
||||
|
||||
[ð](#lib:uninitialized_fill_n_)
|
||||
|
||||
`namespace ranges {
|
||||
template<[nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, class T>
|
||||
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<iter_value_t<I>, const T&>
|
||||
constexpr I uninitialized_fill_n(I first, iter_difference_t<I> n, const T& x);
|
||||
}
|
||||
`
|
||||
|
||||
[4](#4)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14169)
|
||||
|
||||
*Effects*: Equivalent to:return uninitialized_fill(counted_iterator(first, n), default_sentinel, x).base();
|
||||
116
cppdraft/uninitialized/move.md
Normal file
116
cppdraft/uninitialized/move.md
Normal file
@@ -0,0 +1,116 @@
|
||||
[uninitialized.move]
|
||||
|
||||
# 26 Algorithms library [[algorithms]](./#algorithms)
|
||||
|
||||
## 26.11 Specialized <memory> algorithms [[specialized.algorithms]](specialized.algorithms#uninitialized.move)
|
||||
|
||||
### 26.11.6 uninitialized_move [uninitialized.move]
|
||||
|
||||
[ð](#lib:uninitialized_move)
|
||||
|
||||
`template<class InputIterator, class NoThrowForwardIterator>
|
||||
constexpr NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
|
||||
NoThrowForwardIterator result);
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13990)
|
||||
|
||||
*Preconditions*: result+[0, (last - first)) does not overlap with [first, last)[.](#1.sentence-1)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L13994)
|
||||
|
||||
*Effects*: Equivalent to:for (; first != last; (void)++result, ++first)::new (*voidify*(*result))typename iterator_traits<NoThrowForwardIterator>::value_type(*deref-move*(first));return result;
|
||||
|
||||
[ð](#lib:uninitialized_move_)
|
||||
|
||||
`namespace ranges {
|
||||
template<[input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_iterator [iterator.concept.input]") I, [sentinel_for](iterator.concept.sentinel#concept:sentinel_for "24.3.4.7 Concept sentinel_for [iterator.concept.sentinel]")<I> S1,
|
||||
[nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [nothrow-sentinel-for](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S2>
|
||||
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<iter_value_t<O>, iter_rvalue_reference_t<I>>
|
||||
constexpr uninitialized_move_result<I, O>
|
||||
uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast);
|
||||
template<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") IR, [nothrow-forward-range](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") OR>
|
||||
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<range_value_t<OR>, range_rvalue_reference_t<IR>>
|
||||
constexpr uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
|
||||
uninitialized_move(IR&& in_range, OR&& out_range);
|
||||
}
|
||||
`
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14021)
|
||||
|
||||
*Preconditions*: [ofirst, olast) does not overlap with [ifirst, ilast)[.](#3.sentence-1)
|
||||
|
||||
[4](#4)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14025)
|
||||
|
||||
*Effects*: Equivalent to:for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)::new (*voidify*(*ofirst)) remove_reference_t<iter_reference_t<O>>(ranges::iter_move(ifirst));return {std::move(ifirst), ofirst};
|
||||
|
||||
[5](#5)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14035)
|
||||
|
||||
[*Note [1](#note-1)*:
|
||||
|
||||
If an exception is thrown, some objects in the range [ifirst, ilast) are
|
||||
left in a valid, but unspecified state[.](#5.sentence-1)
|
||||
|
||||
â *end note*]
|
||||
|
||||
[ð](#lib:uninitialized_move_n)
|
||||
|
||||
`template<class InputIterator, class Size, class NoThrowForwardIterator>
|
||||
constexpr pair<InputIterator, NoThrowForwardIterator>
|
||||
uninitialized_move_n(InputIterator first, Size n, NoThrowForwardIterator result);
|
||||
`
|
||||
|
||||
[6](#6)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14050)
|
||||
|
||||
*Preconditions*: result+[0, n) does not overlap with first+[0, n)[.](#6.sentence-1)
|
||||
|
||||
[7](#7)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14054)
|
||||
|
||||
*Effects*: Equivalent to:for (; n > 0; ++result, (void)++first, --n)::new (*voidify*(*result))typename iterator_traits<NoThrowForwardIterator>::value_type(*deref-move*(first));return {first, result};
|
||||
|
||||
[ð](#lib:uninitialized_move_n_)
|
||||
|
||||
`namespace ranges {
|
||||
template<[input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_iterator [iterator.concept.input]") I, [nothrow-forward-iterator](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [nothrow-sentinel-for](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S>
|
||||
requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<iter_value_t<O>, iter_rvalue_reference_t<I>>
|
||||
constexpr uninitialized_move_n_result<I, O>
|
||||
uninitialized_move_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
|
||||
}
|
||||
`
|
||||
|
||||
[8](#8)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14076)
|
||||
|
||||
*Preconditions*: [ofirst, olast) does not overlap with ifirst+[0, n)[.](#8.sentence-1)
|
||||
|
||||
[9](#9)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14080)
|
||||
|
||||
*Effects*: Equivalent to:auto t = uninitialized_move(counted_iterator(std::move(ifirst), n),
|
||||
default_sentinel, ofirst, olast);return {std::move(t.in).base(), t.out};
|
||||
|
||||
[10](#10)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L14089)
|
||||
|
||||
[*Note [2](#note-2)*:
|
||||
|
||||
If an exception is thrown, some objects in the rangeifirst+[0, n) are left in a valid but unspecified state[.](#10.sentence-1)
|
||||
|
||||
â *end note*]
|
||||
Reference in New Issue
Block a user