From Jason Turner

[sequence.reqmts]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmprk1j68iw/{from.md → to.md} +30 -28
tmp/tmprk1j68iw/{from.md → to.md} RENAMED
@@ -18,30 +18,28 @@ deletions from the middle of the sequence. `deque` is the data structure
18
  of choice when most insertions and deletions take place at the beginning
19
  or at the end of the sequence.
20
 
21
  In Tables  [[tab:containers.sequence.requirements]] and
22
  [[tab:containers.sequence.optional]], `X` denotes a sequence container
23
- class, `a` denotes a value of `X` containing elements of type `T`, `A`
24
- denotes `X::allocator_type` if it exists and `std::allocator<T>` if it
25
- doesn’t, `i` and `j` denote iterators satisfying input iterator
26
- requirements and refer to elements implicitly convertible to
27
- `value_type`, `[i, j)` denotes a valid range, `il` designates an object
28
- of type `initializer_list<value_type>`, `n` denotes a value of
29
- `X::size_type`, `p` denotes a valid const iterator to `a`, `q` denotes a
30
- valid dereferenceable const iterator to `a`, `[q1, q2)` denotes a valid
31
- range of const iterators in `a`, `t` denotes an lvalue or a const rvalue
32
- of `X::value_type`, and `rv` denotes a non-const rvalue of
33
- `X::value_type`. `Args` denotes a template parameter pack; `args`
34
- denotes a function parameter pack with the pattern `Args&&`.
 
 
 
35
 
36
  The complexities of the expressions are sequence dependent.
37
 
38
- `iterator`
39
-
40
- and `const_iterator` types for sequence containers shall be at least of
41
- the forward iterator category.
42
-
43
  The iterator returned from `a.insert(p, t)` points to the copy of `t`
44
  inserted into `a`.
45
 
46
  The iterator returned from `a.insert(p, rv)` points to the copy of `rv`
47
  inserted into `a`.
@@ -71,35 +69,39 @@ For every sequence container defined in this Clause and in Clause 
71
 
72
  - If the constructor
73
  ``` cpp
74
  template <class InputIterator>
75
  X(InputIterator first, InputIterator last,
76
- const allocator_type& alloc = allocator_type())
77
  ```
78
 
79
  is called with a type `InputIterator` that does not qualify as an
80
  input iterator, then the constructor shall not participate in overload
81
  resolution.
82
  - If the member functions of the forms:
83
  ``` cpp
84
- template <class InputIterator> // such as insert()
85
- rt fx1(const_iterator p, InputIterator first, InputIterator last);
 
86
 
87
- template <class InputIterator> // such as append(), assign()
88
- rt fx2(InputIterator first, InputIterator last);
89
 
90
- template <class InputIterator> // such as replace()
91
- rt fx3(const_iterator i1, const_iterator i2, InputIterator first, InputIterator last);
 
92
  ```
93
 
94
  are called with a type `InputIterator` that does not qualify as an
95
  input iterator, then these functions shall not participate in overload
96
  resolution.
97
-
98
- The extent to which an implementation determines that a type cannot be
99
- an input iterator is unspecified, except that as a minimum integral
100
- types shall not qualify as input iterators.
 
 
101
 
102
  Table  [[tab:containers.sequence.optional]] lists operations that are
103
  provided for some types of sequence containers but not others. An
104
  implementation shall provide these operations for all container types
105
  shown in the “container” column, and shall implement them so as to take
 
18
  of choice when most insertions and deletions take place at the beginning
19
  or at the end of the sequence.
20
 
21
  In Tables  [[tab:containers.sequence.requirements]] and
22
  [[tab:containers.sequence.optional]], `X` denotes a sequence container
23
+ class, `a` denotes a value of type `X` containing elements of type `T`,
24
+ `u` denotes the name of a variable being declared, `A` denotes
25
+ `X::allocator_type` if the *qualified-id* `X::allocator_type` is valid
26
+ and denotes a type ([[temp.deduct]]) and `allocator<T>` if it doesn’t,
27
+ `i` and `j` denote iterators satisfying input iterator requirements and
28
+ refer to elements implicitly convertible to `value_type`, `[i, j)`
29
+ denotes a valid range, `il` designates an object of type
30
+ `initializer_list<value_type>`, `n` denotes a value of type
31
+ `X::size_type`, `p` denotes a valid constant iterator to `a`, `q`
32
+ denotes a valid dereferenceable constant iterator to `a`, `[q1, q2)`
33
+ denotes a valid range of constant iterators in `a`, `t` denotes an
34
+ lvalue or a const rvalue of `X::value_type`, and `rv` denotes a
35
+ non-const rvalue of `X::value_type`. `Args` denotes a template parameter
36
+ pack; `args` denotes a function parameter pack with the pattern
37
+ `Args&&`.
38
 
39
  The complexities of the expressions are sequence dependent.
40
 
 
 
 
 
 
41
  The iterator returned from `a.insert(p, t)` points to the copy of `t`
42
  inserted into `a`.
43
 
44
  The iterator returned from `a.insert(p, rv)` points to the copy of `rv`
45
  inserted into `a`.
 
69
 
70
  - If the constructor
71
  ``` cpp
72
  template <class InputIterator>
73
  X(InputIterator first, InputIterator last,
74
+ const allocator_type& alloc = allocator_type());
75
  ```
76
 
77
  is called with a type `InputIterator` that does not qualify as an
78
  input iterator, then the constructor shall not participate in overload
79
  resolution.
80
  - If the member functions of the forms:
81
  ``` cpp
82
+ template <class InputIterator>
83
+ return-type F(const_iterator p,
84
+ InputIterator first, InputIterator last); // such as insert
85
 
86
+ template <class InputIterator>
87
+ return-type F(InputIterator first, InputIterator last); // such as append, assign
88
 
89
+ template <class InputIterator>
90
+ return-type F(const_iterator i1, const_iterator i2,
91
+ InputIterator first, InputIterator last); // such as replace
92
  ```
93
 
94
  are called with a type `InputIterator` that does not qualify as an
95
  input iterator, then these functions shall not participate in overload
96
  resolution.
97
+ - A deduction guide for a sequence container shall not participate in
98
+ overload resolution if it has an `InputIterator` template parameter
99
+ and a type that does not qualify as an input iterator is deduced for
100
+ that parameter, or if it has an `Allocator` template parameter and a
101
+ type that does not qualify as an allocator is deduced for that
102
+ parameter.
103
 
104
  Table  [[tab:containers.sequence.optional]] lists operations that are
105
  provided for some types of sequence containers but not others. An
106
  implementation shall provide these operations for all container types
107
  shown in the “container” column, and shall implement them so as to take