From Jason Turner

[move.iter.ops]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmppav890ob/{from.md → to.md} +0 -221
tmp/tmppav890ob/{from.md → to.md} RENAMED
@@ -1,221 +0,0 @@
1
- #### `move_iterator` operations <a id="move.iter.ops">[[move.iter.ops]]</a>
2
-
3
- ##### `move_iterator` constructors <a id="move.iter.op.const">[[move.iter.op.const]]</a>
4
-
5
- ``` cpp
6
- constexpr move_iterator();
7
- ```
8
-
9
- *Effects:* Constructs a `move_iterator`, value-initializing `current`.
10
- Iterator operations applied to the resulting iterator have defined
11
- behavior if and only if the corresponding operations are defined on a
12
- value-initialized iterator of type `Iterator`.
13
-
14
- ``` cpp
15
- constexpr explicit move_iterator(Iterator i);
16
- ```
17
-
18
- *Effects:* Constructs a `move_iterator`, initializing `current` with
19
- `i`.
20
-
21
- ``` cpp
22
- template <class U> constexpr move_iterator(const move_iterator<U>& u);
23
- ```
24
-
25
- *Effects:* Constructs a `move_iterator`, initializing `current` with
26
- `u.base()`.
27
-
28
- *Requires:* `U` shall be convertible to `Iterator`.
29
-
30
- ##### `move_iterator::operator=` <a id="move.iter.op=">[[move.iter.op=]]</a>
31
-
32
- ``` cpp
33
- template <class U> constexpr move_iterator& operator=(const move_iterator<U>& u);
34
- ```
35
-
36
- *Effects:* Assigns `u.base()` to `current`.
37
-
38
- *Requires:* `U` shall be convertible to `Iterator`.
39
-
40
- ##### `move_iterator` conversion <a id="move.iter.op.conv">[[move.iter.op.conv]]</a>
41
-
42
- ``` cpp
43
- constexpr Iterator base() const;
44
- ```
45
-
46
- *Returns:* `current`.
47
-
48
- ##### `move_iterator::operator*` <a id="move.iter.op.star">[[move.iter.op.star]]</a>
49
-
50
- ``` cpp
51
- constexpr reference operator*() const;
52
- ```
53
-
54
- *Returns:* `static_cast<reference>(*current)`.
55
-
56
- ##### `move_iterator::operator->` <a id="move.iter.op.ref">[[move.iter.op.ref]]</a>
57
-
58
- ``` cpp
59
- constexpr pointer operator->() const;
60
- ```
61
-
62
- *Returns:* `current`.
63
-
64
- ##### `move_iterator::operator++` <a id="move.iter.op.incr">[[move.iter.op.incr]]</a>
65
-
66
- ``` cpp
67
- constexpr move_iterator& operator++();
68
- ```
69
-
70
- *Effects:* As if by `++current`.
71
-
72
- *Returns:* `*this`.
73
-
74
- ``` cpp
75
- constexpr move_iterator operator++(int);
76
- ```
77
-
78
- *Effects:* As if by:
79
-
80
- ``` cpp
81
- move_iterator tmp = *this;
82
- ++current;
83
- return tmp;
84
- ```
85
-
86
- ##### `move_iterator::operator-{-}` <a id="move.iter.op.decr">[[move.iter.op.decr]]</a>
87
-
88
- ``` cpp
89
- constexpr move_iterator& operator--();
90
- ```
91
-
92
- *Effects:* As if by `current`.
93
-
94
- *Returns:* `*this`.
95
-
96
- ``` cpp
97
- constexpr move_iterator operator--(int);
98
- ```
99
-
100
- *Effects:* As if by:
101
-
102
- ``` cpp
103
- move_iterator tmp = *this;
104
- --current;
105
- return tmp;
106
- ```
107
-
108
- ##### `move_iterator::operator+` <a id="move.iter.op.+">[[move.iter.op.+]]</a>
109
-
110
- ``` cpp
111
- constexpr move_iterator operator+(difference_type n) const;
112
- ```
113
-
114
- *Returns:* `move_iterator(current + n)`.
115
-
116
- ##### `move_iterator::operator+=` <a id="move.iter.op.+=">[[move.iter.op.+=]]</a>
117
-
118
- ``` cpp
119
- constexpr move_iterator& operator+=(difference_type n);
120
- ```
121
-
122
- *Effects:* As if by: `current += n;`
123
-
124
- *Returns:* `*this`.
125
-
126
- ##### `move_iterator::operator-` <a id="move.iter.op.-">[[move.iter.op.-]]</a>
127
-
128
- ``` cpp
129
- constexpr move_iterator operator-(difference_type n) const;
130
- ```
131
-
132
- *Returns:* `move_iterator(current - n)`.
133
-
134
- ##### `move_iterator::operator-=` <a id="move.iter.op.-=">[[move.iter.op.-=]]</a>
135
-
136
- ``` cpp
137
- constexpr move_iterator& operator-=(difference_type n);
138
- ```
139
-
140
- *Effects:* As if by: `current -= n;`
141
-
142
- *Returns:* `*this`.
143
-
144
- ##### `move_iterator::operator[]` <a id="move.iter.op.index">[[move.iter.op.index]]</a>
145
-
146
- ``` cpp
147
- constexpr unspecified operator[](difference_type n) const;
148
- ```
149
-
150
- *Returns:* `std::move(current[n])`.
151
-
152
- ##### `move_iterator` comparisons <a id="move.iter.op.comp">[[move.iter.op.comp]]</a>
153
-
154
- ``` cpp
155
- template <class Iterator1, class Iterator2>
156
- constexpr bool operator==(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
157
- ```
158
-
159
- *Returns:* `x.base() == y.base()`.
160
-
161
- ``` cpp
162
- template <class Iterator1, class Iterator2>
163
- constexpr bool operator!=(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
164
- ```
165
-
166
- *Returns:* `!(x == y)`.
167
-
168
- ``` cpp
169
- template <class Iterator1, class Iterator2>
170
- constexpr bool operator<(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
171
- ```
172
-
173
- *Returns:* `x.base() < y.base()`.
174
-
175
- ``` cpp
176
- template <class Iterator1, class Iterator2>
177
- constexpr bool operator<=(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
178
- ```
179
-
180
- *Returns:* `!(y < x)`.
181
-
182
- ``` cpp
183
- template <class Iterator1, class Iterator2>
184
- constexpr bool operator>(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
185
- ```
186
-
187
- *Returns:* `y < x`.
188
-
189
- ``` cpp
190
- template <class Iterator1, class Iterator2>
191
- constexpr bool operator>=(const move_iterator<Iterator1>& x, const move_iterator<Iterator2>& y);
192
- ```
193
-
194
- *Returns:* `!(x < y)`.
195
-
196
- ##### `move_iterator` non-member functions <a id="move.iter.nonmember">[[move.iter.nonmember]]</a>
197
-
198
- ``` cpp
199
- template <class Iterator1, class Iterator2>
200
- constexpr auto operator-(
201
- const move_iterator<Iterator1>& x,
202
- const move_iterator<Iterator2>& y) -> decltype(x.base() - y.base());
203
- ```
204
-
205
- *Returns:* `x.base() - y.base()`.
206
-
207
- ``` cpp
208
- template <class Iterator>
209
- constexpr move_iterator<Iterator> operator+(
210
- typename move_iterator<Iterator>::difference_type n, const move_iterator<Iterator>& x);
211
- ```
212
-
213
- *Returns:* `x + n`.
214
-
215
- ``` cpp
216
- template <class Iterator>
217
- constexpr move_iterator<Iterator> make_move_iterator(Iterator i);
218
- ```
219
-
220
- *Returns:* `move_iterator<Iterator>(i)`.
221
-