Date
2010-11-24.14:01:03
Message id
5420

Content

Proposed resolution:

  1. Change [forwardlist.ops]/12 as indicated:

    void remove(const T& value);
    template <class Predicate> void remove_if(Predicate pred);
    

    12 Effects: Erases all the elements in the list referred by a list iterator i for which the following conditions hold: *i == value (for remove()), pred(*i) is true (for remove_if()). This operation shall be stable: the relative order of the elements that are not removed is the same as their relative order in the original list. Invalidates only the iterators and references to the erased elements.

  2. Change [forwardlist.ops]/15 as indicated:

    template <class BinaryPredicate> void unique(BinaryPredicate pred);
    

    15 Effects:: EliminatesErases all but the first element from every consecutive group of equal elements referred to by the iterator i in the range [first + 1,last) for which *i == *(i-1) (for the version with no arguments) or pred(*i, *(i - 1)) (for the version with a predicate argument) holds. Invalidates only the iterators and references to the erased elements.

  3. Change [forwardlist.ops]/19 as indicated:

    void merge(forward_list<T,Allocator>&& x);
    template <class Compare> void merge(forward_list<T,Allocator>&& x, Compare comp)
    

    [..]

    19 Effects:: Merges x into *this. This operation shall be stable: for equivalent elements in the two lists, the elements from *this shall always precede the elements from x. x is empty after the merge. If an exception is thrown other than by a comparison there are no effects. Pointers and references to the moved elements of x now refer to those same elements but as members of *this. Iterators referring to the moved elements will continue to refer to their elements, but they now behave as iterators into *this, not into x.

  4. Change [forwardlist.ops]/22 as indicated:

    void sort();
    template <class Compare> void sort(Compare comp);
    

    [..]

    22 Effects:: Sorts the list according to the operator< or the comp function object. This operation shall be stable: the relative order of the equivalent elements is preserved. If an exception is thrown the order of the elements in *this is unspecified. Does not affect the validity of iterators and references.

  5. Change [forwardlist.ops]/24 as indicated:

    void reverse();
    

    24 Effects:: Reverses the order of the elements in the list. Does not affect the validity of iterators and references.

  6. Change [list.ops], p15:

                               void remove(const T& value);
    template <class Predicate> void remove_if(Predicate pred);
    

    Effects: Erases all the elements in the list referred by a list iterator i for which the following conditions hold: *i == value, pred(*i) != false. Invalidates only the iterators and references to the erased elements.

  7. Change [list.ops], p19:

                                     void unique();
    template <class BinaryPredicate> void unique(BinaryPredicate binary_pred);
    

    Effects: Eliminates Erases all but the first element from every consecutive group of equal elements referred to by the iterator i in the range [first + 1,last) for which *i == *(i-1) (for the version of unique with no arguments) or pred(*i, *(i - 1)) (for the version of unique with a predicate argument) holds. Invalidates only the iterators and references to the erased elements.

  8. Change [list.ops], p23:

    void                          merge(list<T,Allocator>&& x);
    template <class Compare> void merge(list<T,Allocator>&& x, Compare comp);
    

    Effects: If (&x == this) does nothing; otherwise, merges the two sorted ranges [begin(), end()) and [x.begin(), x.end()). The result is a range in which the elements will be sorted in non-decreasing order according to the ordering defined by comp; that is, for every iterator i, in the range other than the first, the condition comp(*i, *(i - 1) will be false. Pointers and references to the moved elements of x now refer to those same elements but as members of *this. Iterators referring to the moved elements will continue to refer to their elements, but they now behave as iterators into *this, not into x.

  9. Change [list.ops], p26:

    void reverse();
    

    Effects: Reverses the order of the elements in the list. Does not affect the validity of iterators and references.

  10. Change [list.ops], p30:

                             void sort();
    template <class Compare> void sort(Compare comp);
    

    Effects: Sorts the list according to the operator< or a Compare function object. Does not affect the validity of iterators and references.