Title
next/prev wrong iterator type
Status
c++11
Section
[iterator.operations]
Submitter
Alisdair Meredith

Created on 2009-03-11.00:00:00 last changed 155 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

  1. Change header <iterator> synopsis [iterator.synopsis] as indicated:

    // 24.4.4, iterator operations:
    ...
    template <class InputForwardIterator>
      InputForwardIterator
      next(InputForwardIterator x, typename std::iterator_traits<InputForwardIterator>::difference_type n = 1);
    
  2. Change [iterator.operations] before p.6 as indicated:

    template <class InputForwardIterator>
      InputForwardIterator
      next(InputForwardIterator x, typename std::iterator_traits<InputForwardIterator>::difference_type n = 1);
    
Date: 2010-10-21.18:28:33

[ 2009-10 Santa Cruz: ]

Moved to Ready.

Date: 2009-10-14.00:00:00

[ 2009-10-14 Daniel provided de-conceptified wording. ]

Date: 2010-10-21.18:28:33

[ 2009-07 Frankfurt ]

Moved from Tentatively Ready to Open only because the wording needs to be tweaked for concepts removal.

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

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

Date: 2009-03-11.00:00:00

Addresses UK 271

next/prev return an incremented iterator without changing the value of the original iterator. However, even this may invalidate an InputIterator. A ForwardIterator is required to guarantee the 'multipass' property.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg313
2010-10-21 18:28:33adminsetmessages: + msg312
2010-10-21 18:28:33adminsetmessages: + msg311
2010-10-21 18:28:33adminsetmessages: + msg310
2010-10-21 18:28:33adminsetmessages: + msg309
2009-03-11 00:00:00admincreate