From Jason Turner

[views]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp0n8d7itm/{from.md → to.md} +703 -0
tmp/tmp0n8d7itm/{from.md → to.md} RENAMED
@@ -0,0 +1,703 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Views <a id="views">[[views]]</a>
2
+
3
+ ### General <a id="views.general">[[views.general]]</a>
4
+
5
+ The header `<span>` defines the view `span`.
6
+
7
+ ### Header `<span>` synopsis <a id="span.syn">[[span.syn]]</a>
8
+
9
+ ``` cpp
10
+ namespace std {
11
+ // constants
12
+ inline constexpr size_t dynamic_extent = numeric_limits<size_t>::max();
13
+
14
+ // [views.span], class template span
15
+ template<class ElementType, size_t Extent = dynamic_extent>
16
+ class span;
17
+
18
+ template<class ElementType, size_t Extent>
19
+ inline constexpr bool ranges::enable_view<span<ElementType, Extent>> =
20
+ Extent == 0 || Extent == dynamic_extent;
21
+ template<class ElementType, size_t Extent>
22
+ inline constexpr bool ranges::enable_borrowed_range<span<ElementType, Extent>> = true;
23
+
24
+ // [span.objectrep], views of object representation
25
+ template<class ElementType, size_t Extent>
26
+ span<const byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
27
+ as_bytes(span<ElementType, Extent> s) noexcept;
28
+
29
+ template<class ElementType, size_t Extent>
30
+ span<byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
31
+ as_writable_bytes(span<ElementType, Extent> s) noexcept;
32
+ }
33
+ ```
34
+
35
+ ### Class template `span` <a id="views.span">[[views.span]]</a>
36
+
37
+ #### Overview <a id="span.overview">[[span.overview]]</a>
38
+
39
+ A `span` is a view over a contiguous sequence of objects, the storage of
40
+ which is owned by some other object.
41
+
42
+ All member functions of `span` have constant time complexity.
43
+
44
+ ``` cpp
45
+ namespace std {
46
+ template<class ElementType, size_t Extent = dynamic_extent>
47
+ class span {
48
+ public:
49
+ // constants and types
50
+ using element_type = ElementType;
51
+ using value_type = remove_cv_t<ElementType>;
52
+ using size_type = size_t;
53
+ using difference_type = ptrdiff_t;
54
+ using pointer = element_type*;
55
+ using const_pointer = const element_type*;
56
+ using reference = element_type&;
57
+ using const_reference = const element_type&;
58
+ using iterator = implementation-defined // type of span::iterator; // see [span.iterators]
59
+ using reverse_iterator = std::reverse_iterator<iterator>;
60
+ static constexpr size_type extent = Extent;
61
+
62
+ // [span.cons], constructors, copy, and assignment
63
+ constexpr span() noexcept;
64
+ template<class It>
65
+ constexpr explicit(extent != dynamic_extent) span(It first, size_type count);
66
+ template<class It, class End>
67
+ constexpr explicit(extent != dynamic_extent) span(It first, End last);
68
+ template<size_t N>
69
+ constexpr span(type_identity_t<element_type> (&arr)[N]) noexcept;
70
+ template<class T, size_t N>
71
+ constexpr span(array<T, N>& arr) noexcept;
72
+ template<class T, size_t N>
73
+ constexpr span(const array<T, N>& arr) noexcept;
74
+ template<class R>
75
+ constexpr explicit(extent != dynamic_extent) span(R&& r);
76
+ constexpr span(const span& other) noexcept = default;
77
+ template<class OtherElementType, size_t OtherExtent>
78
+ constexpr explicit(see below) span(const span<OtherElementType, OtherExtent>& s) noexcept;
79
+
80
+ ~span() noexcept = default;
81
+
82
+ constexpr span& operator=(const span& other) noexcept = default;
83
+
84
+ // [span.sub], subviews
85
+ template<size_t Count>
86
+ constexpr span<element_type, Count> first() const;
87
+ template<size_t Count>
88
+ constexpr span<element_type, Count> last() const;
89
+ template<size_t Offset, size_t Count = dynamic_extent>
90
+ constexpr span<element_type, see below> subspan() const;
91
+
92
+ constexpr span<element_type, dynamic_extent> first(size_type count) const;
93
+ constexpr span<element_type, dynamic_extent> last(size_type count) const;
94
+ constexpr span<element_type, dynamic_extent> subspan(
95
+ size_type offset, size_type count = dynamic_extent) const;
96
+
97
+ // [span.obs], observers
98
+ constexpr size_type size() const noexcept;
99
+ constexpr size_type size_bytes() const noexcept;
100
+ [[nodiscard]] constexpr bool empty() const noexcept;
101
+
102
+ // [span.elem], element access
103
+ constexpr reference operator[](size_type idx) const;
104
+ constexpr reference front() const;
105
+ constexpr reference back() const;
106
+ constexpr pointer data() const noexcept;
107
+
108
+ // [span.iterators], iterator support
109
+ constexpr iterator begin() const noexcept;
110
+ constexpr iterator end() const noexcept;
111
+ constexpr reverse_iterator rbegin() const noexcept;
112
+ constexpr reverse_iterator rend() const noexcept;
113
+
114
+ private:
115
+ pointer data_; // exposition only
116
+ size_type size_; // exposition only
117
+ };
118
+
119
+ template<class It, class EndOrSize>
120
+ span(It, EndOrSize) -> span<remove_reference_t<iter_reference_t<It>>>;
121
+ template<class T, size_t N>
122
+ span(T (&)[N]) -> span<T, N>;
123
+ template<class T, size_t N>
124
+ span(array<T, N>&) -> span<T, N>;
125
+ template<class T, size_t N>
126
+ span(const array<T, N>&) -> span<const T, N>;
127
+ template<class R>
128
+ span(R&&) -> span<remove_reference_t<ranges::range_reference_t<R>>>;
129
+ }
130
+ ```
131
+
132
+ `ElementType` is required to be a complete object type that is not an
133
+ abstract class type.
134
+
135
+ #### Constructors, copy, and assignment <a id="span.cons">[[span.cons]]</a>
136
+
137
+ ``` cpp
138
+ constexpr span() noexcept;
139
+ ```
140
+
141
+ *Constraints:* `Extent == dynamic_extent || Extent == 0` is `true`.
142
+
143
+ *Ensures:* `size() == 0 && data() == nullptr`.
144
+
145
+ ``` cpp
146
+ template<class It>
147
+ constexpr explicit(extent != dynamic_extent) span(It first, size_type count);
148
+ ```
149
+
150
+ *Constraints:* Let `U` be `remove_reference_t<iter_reference_t<It>>`.
151
+
152
+ - `It` satisfies `contiguous_iterator`.
153
+ - `is_convertible_v<U(*)[], element_type(*)[]>` is `true`.
154
+ \[*Note 1*: The intent is to allow only qualification conversions of
155
+ the iterator reference type to `element_type`. — *end note*]
156
+
157
+ *Preconditions:*
158
+
159
+ - \[`first`, `first + count`) is a valid range.
160
+ - `It` models `contiguous_iterator`.
161
+ - If `extent` is not equal to `dynamic_extent`, then `count` is equal to
162
+ `extent`.
163
+
164
+ *Effects:* Initializes `data_` with `to_address(first)` and `size_` with
165
+ `count`.
166
+
167
+ *Throws:* Nothing.
168
+
169
+ ``` cpp
170
+ template<class It, class End>
171
+ constexpr explicit(extent != dynamic_extent) span(It first, End last);
172
+ ```
173
+
174
+ *Constraints:* Let `U` be `remove_reference_t<iter_reference_t<It>>`.
175
+
176
+ - `is_convertible_v<U(*)[], element_type(*)[]>` is `true`.
177
+ \[*Note 2*: The intent is to allow only qualification conversions of
178
+ the iterator reference type to `element_type`. — *end note*]
179
+ - `It` satisfies `contiguous_iterator`.
180
+ - `End` satisfies `sized_sentinel_for<It>`.
181
+ - `is_convertible_v<End, size_t>` is `false`.
182
+
183
+ *Preconditions:*
184
+
185
+ - If `extent` is not equal to `dynamic_extent`, then `last - first` is
186
+ equal to `extent`.
187
+ - \[`first`, `last`) is a valid range.
188
+ - `It` models `contiguous_iterator`.
189
+ - `End` models `sized_sentinel_for<It>`.
190
+
191
+ *Effects:* Initializes `data_` with `to_address(first)` and `size_` with
192
+ `last - first`.
193
+
194
+ *Throws:* When and what `last - first` throws.
195
+
196
+ ``` cpp
197
+ template<size_t N> constexpr span(type_identity_t<element_type> (&arr)[N]) noexcept;
198
+ template<class T, size_t N> constexpr span(array<T, N>& arr) noexcept;
199
+ template<class T, size_t N> constexpr span(const array<T, N>& arr) noexcept;
200
+ ```
201
+
202
+ *Constraints:* Let `U` be `remove_pointer_t<decltype(data(arr))>`.
203
+
204
+ - `extent == dynamic_extent || N == extent` is `true`, and
205
+ - `is_convertible_v<U(*)[], element_type(*)[]>` is `true`.
206
+ \[*Note 3*: The intent is to allow only qualification conversions of
207
+ the array element type to `element_type`. — *end note*]
208
+
209
+ *Effects:* Constructs a `span` that is a view over the supplied array.
210
+
211
+ [*Note 1*: `type_identity_t` affects class template argument
212
+ deduction. — *end note*]
213
+
214
+ *Ensures:* `size() == N && data() == data(arr)` is `true`.
215
+
216
+ ``` cpp
217
+ template<class R> constexpr explicit(extent != dynamic_extent) span(R&& r);
218
+ ```
219
+
220
+ *Constraints:* Let `U` be
221
+ `remove_reference_t<ranges::range_reference_t<R>>`.
222
+
223
+ - `R` satisfies `ranges::contiguous_range` and `ranges::sized_range`.
224
+ - Either `R` satisfies `ranges::borrowed_range` or
225
+ `is_const_v<element_type>` is `true`.
226
+ - `remove_cvref_t<R>` is not a specialization of `span`.
227
+ - `remove_cvref_t<R>` is not a specialization of `array`.
228
+ - `is_array_v<remove_cvref_t<R>>` is `false`.
229
+ - `is_convertible_v<U(*)[], element_type(*)[]>` is `true`.
230
+ \[*Note 4*: The intent is to allow only qualification conversions of
231
+ the range reference type to `element_type`. — *end note*]
232
+
233
+ *Preconditions:*
234
+
235
+ - If `extent` is not equal to `dynamic_extent`, then `ranges::size(r)`
236
+ is equal to `extent`.
237
+ - `R` models `ranges::contiguous_range` and `ranges::sized_range`.
238
+ - If `is_const_v<element_type>` is `false`, `R` models
239
+ `ranges::borrowed_range`.
240
+
241
+ *Effects:* Initializes `data_` with `ranges::data(r)` and `size_` with
242
+ `ranges::size(r)`.
243
+
244
+ *Throws:* What and when `ranges::data(r)` and `ranges::size(r)` throw.
245
+
246
+ ``` cpp
247
+ constexpr span(const span& other) noexcept = default;
248
+ ```
249
+
250
+ *Ensures:* `other.size() == size() && other.data() == data()`.
251
+
252
+ ``` cpp
253
+ template<class OtherElementType, size_t OtherExtent>
254
+ constexpr explicit(see below) span(const span<OtherElementType, OtherExtent>& s) noexcept;
255
+ ```
256
+
257
+ *Constraints:*
258
+
259
+ - `extent == dynamic_extent` `||` `OtherExtent == dynamic_extent` `||`
260
+ `extent == OtherExtent` is `true`, and
261
+ - `is_convertible_v<OtherElementType(*)[], element_type(*)[]>` is
262
+ `true`. \[*Note 5*: The intent is to allow only qualification
263
+ conversions of the `OtherElementType` to
264
+ `element_type`. — *end note*]
265
+
266
+ *Preconditions:* If `extent` is not equal to `dynamic_extent`, then
267
+ `s.size()` is equal to `extent`.
268
+
269
+ *Effects:* Constructs a `span` that is a view over the range
270
+ \[`s.data()`, `s.data() + s.size()`).
271
+
272
+ *Ensures:* `size() == s.size() && data() == s.data()`.
273
+
274
+ *Remarks:* The expression inside `explicit` is equivalent to:
275
+
276
+ ``` cpp
277
+ extent != dynamic_extent && OtherExtent == dynamic_extent
278
+ ```
279
+
280
+ ``` cpp
281
+ constexpr span& operator=(const span& other) noexcept = default;
282
+ ```
283
+
284
+ *Ensures:* `size() == other.size() && data() == other.data()`.
285
+
286
+ #### Deduction guides <a id="span.deduct">[[span.deduct]]</a>
287
+
288
+ ``` cpp
289
+ template<class It, class EndOrSize>
290
+ span(It, EndOrSize) -> span<remove_reference_t<iter_reference_t<It>>>;
291
+ ```
292
+
293
+ *Constraints:* `It` satisfies `contiguous_iterator`.
294
+
295
+ ``` cpp
296
+ template<class R>
297
+ span(R&&) -> span<remove_reference_t<ranges::range_reference_t<R>>>;
298
+ ```
299
+
300
+ *Constraints:* `R` satisfies `ranges::contiguous_range`.
301
+
302
+ #### Subviews <a id="span.sub">[[span.sub]]</a>
303
+
304
+ ``` cpp
305
+ template<size_t Count> constexpr span<element_type, Count> first() const;
306
+ ```
307
+
308
+ *Mandates:* `Count <= Extent` is `true`.
309
+
310
+ *Preconditions:* `Count <= size()` is `true`.
311
+
312
+ *Effects:* Equivalent to: `return R{data(), Count};` where `R` is the
313
+ return type.
314
+
315
+ ``` cpp
316
+ template<size_t Count> constexpr span<element_type, Count> last() const;
317
+ ```
318
+
319
+ *Mandates:* `Count <= Extent` is `true`.
320
+
321
+ *Preconditions:* `Count <= size()` is `true`.
322
+
323
+ *Effects:* Equivalent to: `return R{data() + (size() - Count), Count};`
324
+ where `R` is the return type.
325
+
326
+ ``` cpp
327
+ template<size_t Offset, size_t Count = dynamic_extent>
328
+ constexpr span<element_type, see below> subspan() const;
329
+ ```
330
+
331
+ *Mandates:*
332
+
333
+ ``` cpp
334
+ Offset <= Extent && (Count == dynamic_extent || Count <= Extent - Offset)
335
+ ```
336
+
337
+ is `true`.
338
+
339
+ *Preconditions:*
340
+
341
+ ``` cpp
342
+ Offset <= size() && (Count == dynamic_extent || Count <= size() - Offset)
343
+ ```
344
+
345
+ is `true`.
346
+
347
+ *Effects:* Equivalent to:
348
+
349
+ ``` cpp
350
+ return span<ElementType, see below>(
351
+ data() + Offset, Count != dynamic_extent ? Count : size() - Offset);
352
+ ```
353
+
354
+ *Remarks:* The second template argument of the returned `span` type is:
355
+
356
+ ``` cpp
357
+ Count != dynamic_extent ? Count
358
+ : (Extent != dynamic_extent ? Extent - Offset
359
+ : dynamic_extent)
360
+ ```
361
+
362
+ ``` cpp
363
+ constexpr span<element_type, dynamic_extent> first(size_type count) const;
364
+ ```
365
+
366
+ *Preconditions:* `count <= size()` is `true`.
367
+
368
+ *Effects:* Equivalent to: `return {data(), count};`
369
+
370
+ ``` cpp
371
+ constexpr span<element_type, dynamic_extent> last(size_type count) const;
372
+ ```
373
+
374
+ *Preconditions:* `count <= size()` is `true`.
375
+
376
+ *Effects:* Equivalent to: `return {data() + (size() - count), count};`
377
+
378
+ ``` cpp
379
+ constexpr span<element_type, dynamic_extent> subspan(
380
+ size_type offset, size_type count = dynamic_extent) const;
381
+ ```
382
+
383
+ *Preconditions:*
384
+
385
+ ``` cpp
386
+ offset <= size() && (count == dynamic_extent || count <= size() - offset)
387
+ ```
388
+
389
+ is `true`.
390
+
391
+ *Effects:* Equivalent to:
392
+
393
+ ``` cpp
394
+ return {data() + offset, count == dynamic_extent ? size() - offset : count};
395
+ ```
396
+
397
+ #### Observers <a id="span.obs">[[span.obs]]</a>
398
+
399
+ ``` cpp
400
+ constexpr size_type size() const noexcept;
401
+ ```
402
+
403
+ *Effects:* Equivalent to: `return size_;`
404
+
405
+ ``` cpp
406
+ constexpr size_type size_bytes() const noexcept;
407
+ ```
408
+
409
+ *Effects:* Equivalent to: `return size() * sizeof(element_type);`
410
+
411
+ ``` cpp
412
+ [[nodiscard]] constexpr bool empty() const noexcept;
413
+ ```
414
+
415
+ *Effects:* Equivalent to: `return size() == 0;`
416
+
417
+ #### Element access <a id="span.elem">[[span.elem]]</a>
418
+
419
+ ``` cpp
420
+ constexpr reference operator[](size_type idx) const;
421
+ ```
422
+
423
+ *Preconditions:* `idx < size()` is `true`.
424
+
425
+ *Effects:* Equivalent to: `return *(data() + idx);`
426
+
427
+ ``` cpp
428
+ constexpr reference front() const;
429
+ ```
430
+
431
+ *Preconditions:* `empty()` is `false`.
432
+
433
+ *Effects:* Equivalent to: `return *data();`
434
+
435
+ ``` cpp
436
+ constexpr reference back() const;
437
+ ```
438
+
439
+ *Preconditions:* `empty()` is `false`.
440
+
441
+ *Effects:* Equivalent to: `return *(data() + (size() - 1));`
442
+
443
+ ``` cpp
444
+ constexpr pointer data() const noexcept;
445
+ ```
446
+
447
+ *Effects:* Equivalent to: `return data_;`
448
+
449
+ #### Iterator support <a id="span.iterators">[[span.iterators]]</a>
450
+
451
+ ``` cpp
452
+ using iterator = implementation-defined // type of span::iterator;
453
+ ```
454
+
455
+ The type models `contiguous_iterator` [[iterator.concept.contiguous]],
456
+ meets the *Cpp17RandomAccessIterator*
457
+ requirements [[random.access.iterators]], and meets the requirements for
458
+ constexpr iterators [[iterator.requirements.general]]. All requirements
459
+ on container iterators [[container.requirements]] apply to
460
+ `span::iterator` as well.
461
+
462
+ ``` cpp
463
+ constexpr iterator begin() const noexcept;
464
+ ```
465
+
466
+ *Returns:* An iterator referring to the first element in the span. If
467
+ `empty()` is `true`, then it returns the same value as `end()`.
468
+
469
+ ``` cpp
470
+ constexpr iterator end() const noexcept;
471
+ ```
472
+
473
+ *Returns:* An iterator which is the past-the-end value.
474
+
475
+ ``` cpp
476
+ constexpr reverse_iterator rbegin() const noexcept;
477
+ ```
478
+
479
+ *Effects:* Equivalent to: `return reverse_iterator(end());`
480
+
481
+ ``` cpp
482
+ constexpr reverse_iterator rend() const noexcept;
483
+ ```
484
+
485
+ *Effects:* Equivalent to: `return reverse_iterator(begin());`
486
+
487
+ #### Views of object representation <a id="span.objectrep">[[span.objectrep]]</a>
488
+
489
+ ``` cpp
490
+ template<class ElementType, size_t Extent>
491
+ span<const byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
492
+ as_bytes(span<ElementType, Extent> s) noexcept;
493
+ ```
494
+
495
+ *Effects:* Equivalent to:
496
+ `return R{reinterpret_cast<const byte*>(s.data()), s.size_bytes()};`
497
+ where `R` is the return type.
498
+
499
+ ``` cpp
500
+ template<class ElementType, size_t Extent>
501
+ span<byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
502
+ as_writable_bytes(span<ElementType, Extent> s) noexcept;
503
+ ```
504
+
505
+ *Constraints:* `is_const_v<ElementType>` is `false`.
506
+
507
+ *Effects:* Equivalent to:
508
+ `return R{reinterpret_cast<byte*>(s.data()), s.size_bytes()};` where `R`
509
+ is the return type.
510
+
511
+ <!-- Link reference definitions -->
512
+ [alg.sorting]: algorithms.md#alg.sorting
513
+ [algorithm.stable]: library.md#algorithm.stable
514
+ [algorithms]: algorithms.md#algorithms
515
+ [algorithms.requirements]: algorithms.md#algorithms.requirements
516
+ [allocator.requirements]: library.md#allocator.requirements
517
+ [allocator.requirements.completeness]: library.md#allocator.requirements.completeness
518
+ [allocator.traits.members]: utilities.md#allocator.traits.members
519
+ [array]: #array
520
+ [array.cons]: #array.cons
521
+ [array.creation]: #array.creation
522
+ [array.members]: #array.members
523
+ [array.overview]: #array.overview
524
+ [array.special]: #array.special
525
+ [array.syn]: #array.syn
526
+ [array.tuple]: #array.tuple
527
+ [array.zero]: #array.zero
528
+ [associative]: #associative
529
+ [associative.general]: #associative.general
530
+ [associative.map.syn]: #associative.map.syn
531
+ [associative.reqmts]: #associative.reqmts
532
+ [associative.reqmts.except]: #associative.reqmts.except
533
+ [associative.set.syn]: #associative.set.syn
534
+ [basic.string]: strings.md#basic.string
535
+ [class.copy.ctor]: class.md#class.copy.ctor
536
+ [class.default.ctor]: class.md#class.default.ctor
537
+ [class.dtor]: class.md#class.dtor
538
+ [container.adaptors]: #container.adaptors
539
+ [container.adaptors.general]: #container.adaptors.general
540
+ [container.alloc.req]: #container.alloc.req
541
+ [container.assoc.req]: #container.assoc.req
542
+ [container.hash.req]: #container.hash.req
543
+ [container.insert.return]: #container.insert.return
544
+ [container.node]: #container.node
545
+ [container.node.compat]: #container.node.compat
546
+ [container.node.cons]: #container.node.cons
547
+ [container.node.dtor]: #container.node.dtor
548
+ [container.node.modifiers]: #container.node.modifiers
549
+ [container.node.observers]: #container.node.observers
550
+ [container.node.overview]: #container.node.overview
551
+ [container.opt]: #container.opt
552
+ [container.req]: #container.req
553
+ [container.requirements]: #container.requirements
554
+ [container.requirements.dataraces]: #container.requirements.dataraces
555
+ [container.requirements.general]: #container.requirements.general
556
+ [container.rev.req]: #container.rev.req
557
+ [container.seq.opt]: #container.seq.opt
558
+ [container.seq.req]: #container.seq.req
559
+ [containers]: #containers
560
+ [containers.general]: #containers.general
561
+ [containers.summary]: #containers.summary
562
+ [dcl.init.aggr]: dcl.md#dcl.init.aggr
563
+ [deque]: #deque
564
+ [deque.capacity]: #deque.capacity
565
+ [deque.cons]: #deque.cons
566
+ [deque.erasure]: #deque.erasure
567
+ [deque.modifiers]: #deque.modifiers
568
+ [deque.overview]: #deque.overview
569
+ [deque.syn]: #deque.syn
570
+ [forward.list.erasure]: #forward.list.erasure
571
+ [forward.list.syn]: #forward.list.syn
572
+ [forwardlist]: #forwardlist
573
+ [forwardlist.access]: #forwardlist.access
574
+ [forwardlist.cons]: #forwardlist.cons
575
+ [forwardlist.iter]: #forwardlist.iter
576
+ [forwardlist.modifiers]: #forwardlist.modifiers
577
+ [forwardlist.ops]: #forwardlist.ops
578
+ [forwardlist.overview]: #forwardlist.overview
579
+ [hash.requirements]: library.md#hash.requirements
580
+ [iterator.concept.contiguous]: iterators.md#iterator.concept.contiguous
581
+ [iterator.requirements]: iterators.md#iterator.requirements
582
+ [iterator.requirements.general]: iterators.md#iterator.requirements.general
583
+ [list]: #list
584
+ [list.capacity]: #list.capacity
585
+ [list.cons]: #list.cons
586
+ [list.erasure]: #list.erasure
587
+ [list.modifiers]: #list.modifiers
588
+ [list.ops]: #list.ops
589
+ [list.overview]: #list.overview
590
+ [list.syn]: #list.syn
591
+ [map]: #map
592
+ [map.access]: #map.access
593
+ [map.cons]: #map.cons
594
+ [map.erasure]: #map.erasure
595
+ [map.modifiers]: #map.modifiers
596
+ [map.overview]: #map.overview
597
+ [multimap]: #multimap
598
+ [multimap.cons]: #multimap.cons
599
+ [multimap.erasure]: #multimap.erasure
600
+ [multimap.modifiers]: #multimap.modifiers
601
+ [multimap.overview]: #multimap.overview
602
+ [multiset]: #multiset
603
+ [multiset.cons]: #multiset.cons
604
+ [multiset.erasure]: #multiset.erasure
605
+ [multiset.overview]: #multiset.overview
606
+ [priority.queue]: #priority.queue
607
+ [priqueue.cons]: #priqueue.cons
608
+ [priqueue.cons.alloc]: #priqueue.cons.alloc
609
+ [priqueue.members]: #priqueue.members
610
+ [priqueue.overview]: #priqueue.overview
611
+ [priqueue.special]: #priqueue.special
612
+ [queue]: #queue
613
+ [queue.cons]: #queue.cons
614
+ [queue.cons.alloc]: #queue.cons.alloc
615
+ [queue.defn]: #queue.defn
616
+ [queue.ops]: #queue.ops
617
+ [queue.special]: #queue.special
618
+ [queue.syn]: #queue.syn
619
+ [random.access.iterators]: iterators.md#random.access.iterators
620
+ [res.on.data.races]: library.md#res.on.data.races
621
+ [sequence.reqmts]: #sequence.reqmts
622
+ [sequences]: #sequences
623
+ [sequences.general]: #sequences.general
624
+ [set]: #set
625
+ [set.cons]: #set.cons
626
+ [set.erasure]: #set.erasure
627
+ [set.overview]: #set.overview
628
+ [span.cons]: #span.cons
629
+ [span.deduct]: #span.deduct
630
+ [span.elem]: #span.elem
631
+ [span.iterators]: #span.iterators
632
+ [span.objectrep]: #span.objectrep
633
+ [span.obs]: #span.obs
634
+ [span.overview]: #span.overview
635
+ [span.sub]: #span.sub
636
+ [span.syn]: #span.syn
637
+ [stack]: #stack
638
+ [stack.cons]: #stack.cons
639
+ [stack.cons.alloc]: #stack.cons.alloc
640
+ [stack.defn]: #stack.defn
641
+ [stack.ops]: #stack.ops
642
+ [stack.special]: #stack.special
643
+ [stack.syn]: #stack.syn
644
+ [strings]: strings.md#strings
645
+ [swappable.requirements]: library.md#swappable.requirements
646
+ [tab:container.opt]: #tab:container.opt
647
+ [tab:container.req]: #tab:container.req
648
+ [tab:container.rev.req]: #tab:container.rev.req
649
+ [tab:container.seq.opt]: #tab:container.seq.opt
650
+ [tab:container.seq.req]: #tab:container.seq.req
651
+ [temp.deduct]: temp.md#temp.deduct
652
+ [temp.param]: temp.md#temp.param
653
+ [temp.type]: temp.md#temp.type
654
+ [unord]: #unord
655
+ [unord.general]: #unord.general
656
+ [unord.hash]: utilities.md#unord.hash
657
+ [unord.map]: #unord.map
658
+ [unord.map.cnstr]: #unord.map.cnstr
659
+ [unord.map.elem]: #unord.map.elem
660
+ [unord.map.erasure]: #unord.map.erasure
661
+ [unord.map.modifiers]: #unord.map.modifiers
662
+ [unord.map.overview]: #unord.map.overview
663
+ [unord.map.syn]: #unord.map.syn
664
+ [unord.multimap]: #unord.multimap
665
+ [unord.multimap.cnstr]: #unord.multimap.cnstr
666
+ [unord.multimap.erasure]: #unord.multimap.erasure
667
+ [unord.multimap.modifiers]: #unord.multimap.modifiers
668
+ [unord.multimap.overview]: #unord.multimap.overview
669
+ [unord.multiset]: #unord.multiset
670
+ [unord.multiset.cnstr]: #unord.multiset.cnstr
671
+ [unord.multiset.erasure]: #unord.multiset.erasure
672
+ [unord.multiset.overview]: #unord.multiset.overview
673
+ [unord.req]: #unord.req
674
+ [unord.req.except]: #unord.req.except
675
+ [unord.set]: #unord.set
676
+ [unord.set.cnstr]: #unord.set.cnstr
677
+ [unord.set.erasure]: #unord.set.erasure
678
+ [unord.set.overview]: #unord.set.overview
679
+ [unord.set.syn]: #unord.set.syn
680
+ [vector]: #vector
681
+ [vector.bool]: #vector.bool
682
+ [vector.capacity]: #vector.capacity
683
+ [vector.cons]: #vector.cons
684
+ [vector.data]: #vector.data
685
+ [vector.erasure]: #vector.erasure
686
+ [vector.modifiers]: #vector.modifiers
687
+ [vector.overview]: #vector.overview
688
+ [vector.syn]: #vector.syn
689
+ [views]: #views
690
+ [views.general]: #views.general
691
+ [views.span]: #views.span
692
+
693
+ [^1]: Equality comparison is a refinement of partitioning if no two
694
+ objects that compare equal fall into different partitions.
695
+
696
+ [^2]: These member functions are only provided by containers whose
697
+ iterators are random access iterators.
698
+
699
+ [^3]: As specified in  [[allocator.requirements]], the requirements in
700
+ this Clause apply only to lists whose allocators compare equal.
701
+
702
+ [^4]: `reserve()` uses `Allocator::allocate()` which may throw an
703
+ appropriate exception.