[sequence.reqmts] (original) (raw)
Preconditions: T is_Cpp17CopyInsertable_ into X.
Postconditions: distance(begin(), end()) == n
Effects: Constructs a sequence container with n copies of t
Preconditions: T is Cpp17EmplaceConstructible into X from *i.
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.
Equivalent to X(il.begin(), il.end())
Preconditions: T is_Cpp17CopyInsertable_ into X and Cpp17CopyAssignable.
Effects: Assigns the range [il.begin(), il.end()) into a.
All existing elements of a are either assigned to or destroyed.
Preconditions: T is Cpp17EmplaceConstructible into X from args.
For vector and deque,T is also_Cpp17MoveInsertable_ into X and Cpp17MoveAssignable.
Effects: Inserts an object of type T constructed withstd::forward<Args>(args)... before p.
[Note 2:
args can directly or indirectly refer to a value in a.
— _end note_]
Preconditions: T is_Cpp17CopyInsertable_ into X.
For vector and deque,T is also Cpp17CopyAssignable.
Effects: Inserts a copy of t before p.
Preconditions: T is_Cpp17MoveInsertable_ into X.
For vector and deque,T is also Cpp17MoveAssignable.
Effects: Inserts a copy of rv before p.
Preconditions: T is_Cpp17CopyInsertable_ into X and Cpp17CopyAssignable.
Effects: Inserts n copies of t before p.
Preconditions: T is Cpp17EmplaceConstructible into X from *i.
For vector and deque, T is also_Cpp17MoveInsertable_ into X, Cpp17MoveConstructible, Cpp17MoveAssignable, and swappable ([swappable.requirements]).
Neither i nor j are iterators into a.
Effects: Inserts copies of elements in [i, j) before p.
Each iterator in the range [i, j) shall be dereferenced exactly once.
a.insert(p, il.begin(), il.end()).
Preconditions: For vector and deque,T is Cpp17MoveAssignable.
Effects: Erases the element pointed to by q.
Preconditions: For vector and deque,T is Cpp17MoveAssignable.
Effects: Erases the elements in the range [q1, q2).
Effects: Destroys all elements in a.
Invalidates all references, pointers, and iterators referring to the elements of a and may invalidate the past-the-end iterator.
Postconditions: a.empty() is true.
Preconditions: T is Cpp17EmplaceConstructible into X from *i and assignable from *i.
For vector, if the iterator does not meet the forward iterator requirements ([forward.iterators]), T is also_Cpp17MoveInsertable_ into X.
Neither i nor j are iterators into a.
Effects: Replaces elements in a with a copy of [i, j).
Invalidates all references, pointers and iterators referring to the elements of a.
For vector and deque, also invalidates the past-the-end iterator.
Each iterator in the range [i, j) shall be dereferenced exactly once.
a.assign(il.begin(), il.end()).
Preconditions: T is_Cpp17CopyInsertable_ into X and Cpp17CopyAssignable.
t is not a reference into a.
Effects: Replaces elements in a with n copies of t.
Invalidates all references, pointers and iterators referring to the elements of a.
For vector and deque, also invalidates the past-the-end iterator.