This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.

898. Small contradiction in n2723 to forward to committee

Section: 23.3.7.6 [forward.list.ops] Status: C++11 Submitter: Arch Robison Opened: 2008-09-08 Last modified: 2023-02-07

Priority: Not Prioritized

View all other issues in [forward.list.ops].

View all issues with C++11 status.

Discussion:

I ran across a small contradiction in working draft n2723.

[forwardlist]p2: A forward_list satisfies all of the requirements of a container (table 90), except that the size() member function is not provided.

[forwardlist.ops]p57: Complexity: At most size() + x.size() - 1 comparisons.

Presumably [forwardlist.ops]p57 needs to be rephrased to not use size(), or note that it is used there only for sake of notational convenience.

[ 2009-03-29 Beman provided proposed wording. ]

[ Batavia (2009-05): ]

We agree with the proposed resolution.

Move to Tentatively Ready.

Proposed resolution:

Change [forwardlist.ops], forward_list operations, paragraph 19, merge complexity as indicated:

Complexity: At most size() + x.size() distance(begin(), end()) + distance(x.begin(), x.end()) - 1 comparisons.