Title
forward_list preconditions
Status
c++11
Section
[forward.list]
Submitter
Martin Sebor

Created on 2008-08-23.00:00:00 last changed 153 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change the Requires clauses [forwardlist], p21, p24, p26, p29, and, [forwardlist.ops], p39, p43, p47 as follows:

Requires: position is before_begin() or is a dereferenceable iterator in the range [begin(), end()) or equal to before_begin(). ...

Date: 2010-10-21.18:28:33

[ Post Summit: ]

Walter: "position is before_begin() or a dereferenceable": add "is" after the "or"

With that minor update, Recommend Tentatively Ready.

Date: 2010-10-21.18:28:33

[ San Francisco: ]

Robert suggested alternate proposed wording which had large support.

Date: 2008-08-23.00:00:00

forward_list member functions that take a forward_list::iterator (denoted position in the function signatures) argument have the following precondition:

Requires: position is dereferenceable or equal to before_begin().

I believe what's actually intended is this:

Requires: position is in the range [before_begin(), end()).

That is, when it's dereferenceable, position must point into *this, not just any forward_list object.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg4160
2010-10-21 18:28:33adminsetmessages: + msg4159
2010-10-21 18:28:33adminsetmessages: + msg4158
2008-08-23 00:00:00admincreate