From Jason Turner

[container.reqmts]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmplobyfy17/{from.md → to.md} +15 -15
tmp/tmplobyfy17/{from.md → to.md} RENAMED
@@ -1,6 +1,6 @@
1
- #### Containers <a id="container.reqmts">[[container.reqmts]]</a>
2
 
3
  A type `X` meets the *container* requirements if the following types,
4
  statements, and expressions are well-formed and have the specified
5
  semantics.
6
 
@@ -80,15 +80,15 @@ X u = rv;
80
  ```
81
 
82
  *Ensures:* `u` is equal to the value that `rv` had before this
83
  construction.
84
 
85
- *Complexity:* Linear for `array` and constant for all other standard
86
- containers.
87
 
88
  ``` cpp
89
- t = v;
90
  ```
91
 
92
  *Result:* `X&`.
93
 
94
  *Ensures:* `t == v`.
@@ -201,12 +201,12 @@ t.swap(s)
201
 
202
  *Result:* `void`.
203
 
204
  *Effects:* Exchanges the contents of `t` and `s`.
205
 
206
- *Complexity:* Linear for `array` and constant for all other standard
207
- containers.
208
 
209
  ``` cpp
210
  swap(t, s)
211
  ```
212
 
@@ -288,11 +288,11 @@ these container types take a `const allocator_type&` argument.
288
  [*Note 2*: If an invocation of a constructor uses the default value of
289
  an optional allocator argument, then the allocator type must support
290
  value-initialization. — *end note*]
291
 
292
  A copy of this allocator is used for any memory allocation and element
293
- construction performed, by these constructors and by all member
294
  functions, during the lifetime of each container object or until the
295
  allocator is replaced. The allocator may be replaced only via assignment
296
  or `swap()`. Allocator replacement is performed by copy assignment, move
297
  assignment, or swapping of the allocator only if
298
 
@@ -306,15 +306,15 @@ operation. In all container types defined in this Clause, the member
306
  `get_allocator()` returns a copy of the allocator used to construct the
307
  container or, if that allocator has been replaced, a copy of the most
308
  recent replacement.
309
 
310
  The expression `a.swap(b)`, for containers `a` and `b` of a standard
311
- container type other than `array`, shall exchange the values of `a` and
312
- `b` without invoking any move, copy, or swap operations on the
313
- individual container elements. Any `Compare`, `Pred`, or `Hash` types
314
- belonging to `a` and `b` shall meet the *Cpp17Swappable* requirements
315
- and shall be exchanged by calling `swap` as described in 
316
  [[swappable.requirements]]. If
317
  `allocator_traits<allocator_type>::propagate_on_container_swap::value`
318
  is `true`, then `allocator_type` shall meet the *Cpp17Swappable*
319
  requirements and the allocators of `a` and `b` shall also be exchanged
320
  by calling `swap` as described in  [[swappable.requirements]].
@@ -324,13 +324,13 @@ iterator referring to an element in one container before the swap shall
324
  refer to the same element in the other container after the swap. It is
325
  unspecified whether an iterator with value `a.end()` before the swap
326
  will have value `b.end()` after the swap.
327
 
328
  Unless otherwise specified (see  [[associative.reqmts.except]],
329
- [[unord.req.except]], [[deque.modifiers]], and [[vector.modifiers]]) all
330
- container types defined in this Clause meet the following additional
331
- requirements:
332
 
333
  - If an exception is thrown by an `insert()` or `emplace()` function
334
  while inserting a single element, that function has no effects.
335
  - If an exception is thrown by a `push_back()`, `push_front()`,
336
  `emplace_back()`, or `emplace_front()` function, that function has no
 
1
+ #### Container requirements <a id="container.reqmts">[[container.reqmts]]</a>
2
 
3
  A type `X` meets the *container* requirements if the following types,
4
  statements, and expressions are well-formed and have the specified
5
  semantics.
6
 
 
80
  ```
81
 
82
  *Ensures:* `u` is equal to the value that `rv` had before this
83
  construction.
84
 
85
+ *Complexity:* Linear for `array` and `inplace_vector` and constant for
86
+ all other standard containers.
87
 
88
  ``` cpp
89
+ t = v
90
  ```
91
 
92
  *Result:* `X&`.
93
 
94
  *Ensures:* `t == v`.
 
201
 
202
  *Result:* `void`.
203
 
204
  *Effects:* Exchanges the contents of `t` and `s`.
205
 
206
+ *Complexity:* Linear for `array` and `inplace_vector`, and constant for
207
+ all other standard containers.
208
 
209
  ``` cpp
210
  swap(t, s)
211
  ```
212
 
 
288
  [*Note 2*: If an invocation of a constructor uses the default value of
289
  an optional allocator argument, then the allocator type must support
290
  value-initialization. — *end note*]
291
 
292
  A copy of this allocator is used for any memory allocation and element
293
+ construction performed, by these constructors and by all other member
294
  functions, during the lifetime of each container object or until the
295
  allocator is replaced. The allocator may be replaced only via assignment
296
  or `swap()`. Allocator replacement is performed by copy assignment, move
297
  assignment, or swapping of the allocator only if
298
 
 
306
  `get_allocator()` returns a copy of the allocator used to construct the
307
  container or, if that allocator has been replaced, a copy of the most
308
  recent replacement.
309
 
310
  The expression `a.swap(b)`, for containers `a` and `b` of a standard
311
+ container type other than `array` and `inplace_vector`, shall exchange
312
+ the values of `a` and `b` without invoking any move, copy, or swap
313
+ operations on the individual container elements. Any `Compare`, `Pred`,
314
+ or `Hash` types belonging to `a` and `b` shall meet the *Cpp17Swappable*
315
+ requirements and shall be exchanged by calling `swap` as described in 
316
  [[swappable.requirements]]. If
317
  `allocator_traits<allocator_type>::propagate_on_container_swap::value`
318
  is `true`, then `allocator_type` shall meet the *Cpp17Swappable*
319
  requirements and the allocators of `a` and `b` shall also be exchanged
320
  by calling `swap` as described in  [[swappable.requirements]].
 
324
  refer to the same element in the other container after the swap. It is
325
  unspecified whether an iterator with value `a.end()` before the swap
326
  will have value `b.end()` after the swap.
327
 
328
  Unless otherwise specified (see  [[associative.reqmts.except]],
329
+ [[unord.req.except]], [[deque.modifiers]], [[inplace.vector.modifiers]],
330
+ and [[vector.modifiers]]) all container types defined in this Clause
331
+ meet the following additional requirements:
332
 
333
  - If an exception is thrown by an `insert()` or `emplace()` function
334
  while inserting a single element, that function has no effects.
335
  - If an exception is thrown by a `push_back()`, `push_front()`,
336
  `emplace_back()`, or `emplace_front()` function, that function has no