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

919. (forward_)list specialized remove algorithms are over constrained

Section: 24.3.9.6 [forward.list.ops], 24.3.10.5 [list.ops] Status: NAD Submitter: Daniel Krügler Opened: 2008-10-06 Last modified: 2023-02-07

Priority: Not Prioritized

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

View all issues with NAD status.

Discussion:

The signatures of forwardlist::remove and list::remove defined in [forwardlist.ops] before 11 + 24.3.10.5 [list.ops] before 15:

requires EqualityComparable<T> void remove(const T& value);

are asymmetric to their predicate variants (which only require Predicate, not EquivalenceRelation) and with the free algorithm remove (which only require HasEqualTo). Also, nothing in the pre-concept WP N2723 implies that EqualityComparable should be the intended requirement.

[ Batavia (2009-05): ]

We agree with the proposed resolution, but would like additional input from concepts experts.

Move to Review.

[ 2009-07-21 Alisdair adds: ]

Current rationale and wording for this issue is built around concepts. I suggest the issue reverts to Open status. I believe there is enough of an issue to review after concepts are removed from the WP to re-examine the issue in Santa Cruz, rather than resolve as NAD Concepts.

[ 2009-10-10 Daniel adds: ]

Recommend NAD: The concept-free wording as of N2960 has no longer the over-specified requirement EqualityComparable for the remove function that uses ==. In fact, now the same test conditions exists as for the free algorithm remove (27.7.8 [alg.remove]). The error was introduced in the process of conceptifying.

[ 2009-10 Santa Cruz: ]

NAD, solved by the removal of concepts.

Proposed resolution:

  1. Replace in [forwardlist.ops] before 11 and in 24.3.10.5 [list.ops] before 15

    requires EqualityComparable<T> HasEqualTo<T, T> void remove(const T& value);