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

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

Priority: Not Prioritized

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

View all issues with NAD status.


The signatures of forwardlist::remove and list::remove defined in [forwardlist.ops] before 11 + [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 [list.ops] before 15

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