Expression | Return type | Assertion/note | |
pre-/post-condition | |||
X(n, t) X u(n, t); | Postconditions: distance(begin(), end()) == n Effects: Constructs a sequence container with n copies of t | ||
X(i, j) X u(i, j); | For vector, if the iterator does
not meet the Cpp17ForwardIterator requirements ([forward.iterators]), T
is also
Cpp17MoveInsertable into X. Postconditions: distance(begin(), end()) == distance(i, j) Effects: Constructs a sequence container equal to the range [i, j). Each iterator in the range [i, j) is dereferenced exactly once. | ||
X(il) | Equivalent to X(il.begin(), il.end()) | ||
a = il | X& | ||
a.emplace(p, args) | iterator | Effects: Inserts an object of type T constructed with stdβ::βforward<βArgsβ>(βargs)... before p. | |
a.insert(p,t) | iterator | ||
a.insert(p,rv) | iterator | ||
a.insert(p,n,t) | iterator | ||
a.insert(p,i,j) | iterator | For vector and deque, T is also
Cpp17MoveInsertable into X, Cpp17MoveConstructible, Cpp17MoveAssignable,
and swappable ([swappable.requirements]). Each iterator in the range [i, j) shall be dereferenced exactly once. | |
a.insert(p, il) | iterator | a.insert(p, il.begin(), il.end()). | |
a.erase(q) | iterator | ||
a.erase(q1,q2) | iterator | ||
a.clear() | void | ||
a.assign(i,j) | void | For vector, if the iterator does not
meet the forward iterator requirements ([forward.iterators]), T
is also
Cpp17MoveInsertable into X. Invalidates all references, pointers and iterators
referring to the elements of a. Each iterator in the range [i, j) shall be dereferenced exactly once. | |
a.assign(il) | void | a.assign(il.begin(), il.end()). | |
a.assign(n,t) | void | Invalidates all references, pointers and iterators
referring to the elements of a. |