Date
2010-10-21.18:28:33
Message id
1515

Content

Proposed resolution:

Change [container.requirements.general]/10:

Unless otherwise specified (see 23.2.4.1, 23.2.5.1, 23.3.2.3, and 23.3.6.4) all container types defined in this Clause meet the following additional requirements:

  • ..
  • no erase(), clear(), pop_back() or pop_front() function throws an exception.
  • ...

Replace the following words from Table 94 — Sequence container requirements (in addition to container) in [sequence.reqmts]:

Table 94 — Sequence container requirements (in addition to container)
Expression Return type Assertion/note
pre-/post-condition
a.clear() void erase(begin(), end())
Destroys all elements in the container a. Invalidates all references, pointers, and iterators referring to the elements of a and may invalidate the past-the-end iterator.
post: size() == 0 a.empty() == true.

Add a new paragraph after [forwardlist.modifiers]/23:

void clear();

23 Effects: Erases all elements in the range [begin(),end()).

Remarks: Does not invalidate past-the-end iterators.