Title
Inconsistency in description of forward_list::splice_after single-element overload
Status
c++14
Section
[forward.list.ops]
Submitter
Edward Catmur

Created on 2012-12-11.00:00:00 last changed 131 months ago

Messages

Date: 2013-04-19.22:36:19

Proposed resolution:

This wording is relative to N3485.

  1. Edit [forwardlist.ops] p6 as indicated:

    void splice_after(const_iterator position, forward_list& x, const_iterator i);
    void splice_after(const_iterator position, forward_list&& x, const_iterator i);
    

    -5- Requires: position is before_begin() or is a dereferenceable iterator in the range [begin(),end()). The iterator following i is a dereferenceable iterator in x. get_allocator() == x.get_allocator().

    -6- Effects: Inserts the element following i into *this, following position, and removes it from x. The result is unchanged if position == i or position == ++i. Pointers and references to *++i continue to refer to the same element but as a member of *this. Iterators to *++i (including i itself) continue to refer to the same element, but now behave as iterators into *this, not into x.

Date: 2013-04-20.00:00:00

[ 2013-04-20 Bristol ]

Date: 2013-03-15.00:00:00

[ 2013-03-15 Issues Teleconference ]

Moved to Tentatively Ready.

Date: 2012-12-11.00:00:00

[forwardlist.ops] p6 has

void splice_after(const_iterator position, forward_list& x, const_iterator i);
void splice_after(const_iterator position, forward_list&& x, const_iterator i);

Effects: Inserts the element following i into *this, following position, and removes it from x. The result is unchanged if position == i or position == ++i. Pointers and references to *i continue to refer to the same element but as a member of *this. Iterators to *i (including i itself) continue to refer to the same element, but now behave as iterators into *this, not into x.

This overload splices the element following i from x to *this, so the language in the two latter sentences should refer to ++i:

Pointers and references to *++i continue to refer to the same element but as a member of *this. Iterators to *++i continue to refer to the same element, but now behave as iterators into *this, not into x.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2013-04-25 19:07:07adminsetstatus: voting -> wp
2013-04-19 22:36:19adminsetmessages: + msg6489
2013-04-19 22:36:19adminsetstatus: ready -> voting
2013-03-18 14:33:00adminsetmessages: + msg6431
2013-03-18 13:02:36adminsetstatus: new -> ready
2012-12-17 21:27:49adminsetmessages: + msg6294
2012-12-11 00:00:00admincreate