tmp/tmps64jimqu/{from.md → to.md}
RENAMED
|
@@ -1,36 +1,35 @@
|
|
| 1 |
### `uninitialized_copy` <a id="uninitialized.copy">[[uninitialized.copy]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class InputIterator, class NoThrowForwardIterator>
|
| 5 |
-
NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
|
| 6 |
NoThrowForwardIterator result);
|
| 7 |
```
|
| 8 |
|
| 9 |
*Preconditions:* `result`+\[0, `(last - first)`) does not overlap with
|
| 10 |
\[`first`, `last`).
|
| 11 |
|
| 12 |
*Effects:* Equivalent to:
|
| 13 |
|
| 14 |
``` cpp
|
| 15 |
for (; first != last; ++result, (void)++first)
|
| 16 |
-
::new (voidify(*result))
|
| 17 |
-
typename iterator_traits<NoThrowForwardIterator>::value_type(*first);
|
| 18 |
```
|
| 19 |
|
| 20 |
*Returns:* `result`.
|
| 21 |
|
| 22 |
``` cpp
|
| 23 |
namespace ranges {
|
| 24 |
template<input_iterator I, sentinel_for<I> S1,
|
| 25 |
nothrow-forward-iterator O, nothrow-sentinel-for<O> S2>
|
| 26 |
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
|
| 27 |
-
uninitialized_copy_result<I, O>
|
| 28 |
uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast);
|
| 29 |
template<input_range IR, nothrow-forward-range OR>
|
| 30 |
requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
|
| 31 |
-
uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
|
| 32 |
uninitialized_copy(IR&& in_range, OR&& out_range);
|
| 33 |
}
|
| 34 |
```
|
| 35 |
|
| 36 |
*Preconditions:* \[`ofirst`, `olast`) does not overlap with \[`ifirst`,
|
|
@@ -44,32 +43,31 @@ for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)
|
|
| 44 |
return {std::move(ifirst), ofirst};
|
| 45 |
```
|
| 46 |
|
| 47 |
``` cpp
|
| 48 |
template<class InputIterator, class Size, class NoThrowForwardIterator>
|
| 49 |
-
NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
|
| 50 |
NoThrowForwardIterator result);
|
| 51 |
```
|
| 52 |
|
| 53 |
*Preconditions:* `result`+\[0, `n`) does not overlap with `first`+\[0,
|
| 54 |
`n`).
|
| 55 |
|
| 56 |
*Effects:* Equivalent to:
|
| 57 |
|
| 58 |
``` cpp
|
| 59 |
for (; n > 0; ++result, (void)++first, --n)
|
| 60 |
-
::new (voidify(*result))
|
| 61 |
-
typename iterator_traits<NoThrowForwardIterator>::value_type(*first);
|
| 62 |
```
|
| 63 |
|
| 64 |
*Returns:* `result`.
|
| 65 |
|
| 66 |
``` cpp
|
| 67 |
namespace ranges {
|
| 68 |
template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
|
| 69 |
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
|
| 70 |
-
uninitialized_copy_n_result<I, O>
|
| 71 |
uninitialized_copy_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
|
| 72 |
}
|
| 73 |
```
|
| 74 |
|
| 75 |
*Preconditions:* \[`ofirst`, `olast`) does not overlap with
|
|
|
|
| 1 |
### `uninitialized_copy` <a id="uninitialized.copy">[[uninitialized.copy]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class InputIterator, class NoThrowForwardIterator>
|
| 5 |
+
constexpr NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
|
| 6 |
NoThrowForwardIterator result);
|
| 7 |
```
|
| 8 |
|
| 9 |
*Preconditions:* `result`+\[0, `(last - first)`) does not overlap with
|
| 10 |
\[`first`, `last`).
|
| 11 |
|
| 12 |
*Effects:* Equivalent to:
|
| 13 |
|
| 14 |
``` cpp
|
| 15 |
for (; first != last; ++result, (void)++first)
|
| 16 |
+
::new (voidify(*result)) iterator_traits<NoThrowForwardIterator>::value_type(*first);
|
|
|
|
| 17 |
```
|
| 18 |
|
| 19 |
*Returns:* `result`.
|
| 20 |
|
| 21 |
``` cpp
|
| 22 |
namespace ranges {
|
| 23 |
template<input_iterator I, sentinel_for<I> S1,
|
| 24 |
nothrow-forward-iterator O, nothrow-sentinel-for<O> S2>
|
| 25 |
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
|
| 26 |
+
constexpr uninitialized_copy_result<I, O>
|
| 27 |
uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast);
|
| 28 |
template<input_range IR, nothrow-forward-range OR>
|
| 29 |
requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
|
| 30 |
+
constexpr uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
|
| 31 |
uninitialized_copy(IR&& in_range, OR&& out_range);
|
| 32 |
}
|
| 33 |
```
|
| 34 |
|
| 35 |
*Preconditions:* \[`ofirst`, `olast`) does not overlap with \[`ifirst`,
|
|
|
|
| 43 |
return {std::move(ifirst), ofirst};
|
| 44 |
```
|
| 45 |
|
| 46 |
``` cpp
|
| 47 |
template<class InputIterator, class Size, class NoThrowForwardIterator>
|
| 48 |
+
constexpr NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
|
| 49 |
NoThrowForwardIterator result);
|
| 50 |
```
|
| 51 |
|
| 52 |
*Preconditions:* `result`+\[0, `n`) does not overlap with `first`+\[0,
|
| 53 |
`n`).
|
| 54 |
|
| 55 |
*Effects:* Equivalent to:
|
| 56 |
|
| 57 |
``` cpp
|
| 58 |
for (; n > 0; ++result, (void)++first, --n)
|
| 59 |
+
::new (voidify(*result)) iterator_traits<NoThrowForwardIterator>::value_type(*first);
|
|
|
|
| 60 |
```
|
| 61 |
|
| 62 |
*Returns:* `result`.
|
| 63 |
|
| 64 |
``` cpp
|
| 65 |
namespace ranges {
|
| 66 |
template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
|
| 67 |
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
|
| 68 |
+
constexpr uninitialized_copy_n_result<I, O>
|
| 69 |
uninitialized_copy_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
|
| 70 |
}
|
| 71 |
```
|
| 72 |
|
| 73 |
*Preconditions:* \[`ofirst`, `olast`) does not overlap with
|