Title
unique requirements
Status
nad editorial
Section
[alg.unique]
Submitter
Howard Hinnant

Created on 2009-04-25.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change [alg.unique]:

template<ForwardIterator Iter> 
  requires OutputIterator<Iter, RvalueOf<Iter::reference>::type> 
        && 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);

Note that the synopsis in [algorithms.syn] is already correct.

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

Howard notes this issue resolves a discrepancy between the synopsis and the description.

Move to NAD Editorial.

Date: 2009-04-25.00:00:00

From Message c++std-core-14160 Howard wrote:

It was the intent of the rvalue reference proposal for unique to only require MoveAssignable: N1860.

And Pete replied:

That was overridden by the subsequent changes made for concepts in N2573, which reimposed the C++03 requirements.

My impression is that this overwrite was a simple (unintentional) mistake. Wording below to correct it.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg730
2010-10-21 18:28:33adminsetmessages: + msg729
2009-04-25 00:00:00admincreate