You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[deque.modifiers]
5 Complexity: The number of calls to the destructor of T is the same as the number of elements erased, but the number of calls to the assignment operator of T is no more than the lesser of the number of elements before the erased elements and the number of elements after the erased elements.
6 Throws: Nothing unless an exception is thrown by the assignment operator of T.
[vector.modifiers]
4 Complexity: The destructor of T is called the number of times equal to the number of the elements erased, but the assignment operator of T is called the number of times equal to the number of elements in the vector after the erased elements.
5 Throws: Nothing unless an exception is thrown by the assignment operator or move assignment operator of T.
Given the similar intention of these subclauses, the wording should be more consistent. In particular, it is a bit unclear to me that:
What is "the assignment operator" in these contexts? Should it be explicit that such an assignment operator requires some specific forms of arguments (e.g. rvalues of type T)?
What does "the assignment operator or move assignment operator of T" exactly mean?
The text was updated successfully, but these errors were encountered:
Decide to make [deque.modifiers] and [vector.modifiers] look more similar, or to make the common wording in [container.requirements.general]. (Note they are already mentioned by [container.requirements.general]/11).
I believe the intended meaning of "the assignment operator" should exclude assignment operators that are not special member functions, i.e. it could be either the copy assignment operator or the move assignment operator of T when appropriate, depending on T.
Not editorial:
Probably better add "Expects:T is ...".
In cases when the belief above is actually invalid. (I don't find any real one.)
N4830
Given the similar intention of these subclauses, the wording should be more consistent. In particular, it is a bit unclear to me that:
T
)?T
" exactly mean?The text was updated successfully, but these errors were encountered: