Title
Superfluous requirement for unique
Status
nad concepts
Section
[alg.unique]
Submitter
Daniel Krügler

Created on 2008-10-03.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Remove [alg.unique]/2

template<ForwardIterator Iter>
  requires OutputIterator<Iter, Iter::reference>
        && EqualityComparable<Iter::value_type>
  Iter unique(Iter first, Iter last);

template<ForwardIterator Iter, EquivalenceRelation<auto, Iter::value_type> Pred>
  requires OutputIterator<Iter, RvalueOf<Iter::reference>::type>
        && CopyConstructible<Pred>
  Iter unique(Iter first, Iter last,
               Pred pred);

1 Effects: ...

2 Requires: The comparison function shall be an equivalence relation.

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

We agree with the proposed resolution. Move to Tentatively Ready.

Date: 2008-10-03.00:00:00

[alg.unique]/2: "Requires: The comparison function shall be an equivalence relation."

The essence of this is already covered by the given requirement

EquivalenceRelation<auto, Iter::value_type> Pred

and should thus be removed.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg4338
2010-10-21 18:28:33adminsetmessages: + msg4337
2008-10-03 00:00:00admincreate