From Jason Turner

[uninitialized.move]

Diff to HTML by rtfpessoa

tmp/tmpr11q0bq6/{from.md → to.md} RENAMED
@@ -1,10 +1,10 @@
1
  ### `uninitialized_move` <a id="uninitialized.move">[[uninitialized.move]]</a>
2
 
3
  ``` cpp
4
  template<class InputIterator, class NoThrowForwardIterator>
5
- NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
6
  NoThrowForwardIterator result);
7
  ```
8
 
9
  *Preconditions:* `result`+\[0, `(last - first)`) does not overlap with
10
  \[`first`, `last`).
@@ -12,24 +12,24 @@ template<class InputIterator, class NoThrowForwardIterator>
12
  *Effects:* Equivalent to:
13
 
14
  ``` cpp
15
  for (; first != last; (void)++result, ++first)
16
  ::new (voidify(*result))
17
- typename iterator_traits<NoThrowForwardIterator>::value_type(std::move(*first));
18
  return result;
19
  ```
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_rvalue_reference_t<I>>
26
- uninitialized_move_result<I, O>
27
  uninitialized_move(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_rvalue_reference_t<IR>>
30
- uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
31
  uninitialized_move(IR&& in_range, OR&& out_range);
32
  }
33
  ```
34
 
35
  *Preconditions:* \[`ofirst`, `olast`) does not overlap with \[`ifirst`,
@@ -48,11 +48,11 @@ return {std::move(ifirst), ofirst};
48
  \[`ifirst`, `ilast`) are left in a valid, but unspecified
49
  state. — *end note*]
50
 
51
  ``` cpp
52
  template<class InputIterator, class Size, class NoThrowForwardIterator>
53
- pair<InputIterator, NoThrowForwardIterator>
54
  uninitialized_move_n(InputIterator first, Size n, NoThrowForwardIterator result);
55
  ```
56
 
57
  *Preconditions:* `result`+\[0, `n`) does not overlap with `first`+\[0,
58
  `n`).
@@ -60,19 +60,19 @@ template<class InputIterator, class Size, class NoThrowForwardIterator>
60
  *Effects:* Equivalent to:
61
 
62
  ``` cpp
63
  for (; n > 0; ++result, (void)++first, --n)
64
  ::new (voidify(*result))
65
- typename iterator_traits<NoThrowForwardIterator>::value_type(std::move(*first));
66
  return {first, result};
67
  ```
68
 
69
  ``` cpp
70
  namespace ranges {
71
  template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
72
  requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
73
- uninitialized_move_n_result<I, O>
74
  uninitialized_move_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
75
  }
76
  ```
77
 
78
  *Preconditions:* \[`ofirst`, `olast`) does not overlap with
 
1
  ### `uninitialized_move` <a id="uninitialized.move">[[uninitialized.move]]</a>
2
 
3
  ``` cpp
4
  template<class InputIterator, class NoThrowForwardIterator>
5
+ constexpr NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
6
  NoThrowForwardIterator result);
7
  ```
8
 
9
  *Preconditions:* `result`+\[0, `(last - first)`) does not overlap with
10
  \[`first`, `last`).
 
12
  *Effects:* Equivalent to:
13
 
14
  ``` cpp
15
  for (; first != last; (void)++result, ++first)
16
  ::new (voidify(*result))
17
+ iterator_traits<NoThrowForwardIterator>::value_type(deref-move(first));
18
  return result;
19
  ```
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_rvalue_reference_t<I>>
26
+ constexpr uninitialized_move_result<I, O>
27
  uninitialized_move(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_rvalue_reference_t<IR>>
30
+ constexpr uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
31
  uninitialized_move(IR&& in_range, OR&& out_range);
32
  }
33
  ```
34
 
35
  *Preconditions:* \[`ofirst`, `olast`) does not overlap with \[`ifirst`,
 
48
  \[`ifirst`, `ilast`) are left in a valid, but unspecified
49
  state. — *end note*]
50
 
51
  ``` cpp
52
  template<class InputIterator, class Size, class NoThrowForwardIterator>
53
+ constexpr pair<InputIterator, NoThrowForwardIterator>
54
  uninitialized_move_n(InputIterator first, Size n, NoThrowForwardIterator result);
55
  ```
56
 
57
  *Preconditions:* `result`+\[0, `n`) does not overlap with `first`+\[0,
58
  `n`).
 
60
  *Effects:* Equivalent to:
61
 
62
  ``` cpp
63
  for (; n > 0; ++result, (void)++first, --n)
64
  ::new (voidify(*result))
65
+ iterator_traits<NoThrowForwardIterator>::value_type(deref-move(first));
66
  return {first, result};
67
  ```
68
 
69
  ``` cpp
70
  namespace ranges {
71
  template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
72
  requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
73
+ constexpr uninitialized_move_n_result<I, O>
74
  uninitialized_move_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
75
  }
76
  ```
77
 
78
  *Preconditions:* \[`ofirst`, `olast`) does not overlap with