Title
Inconsistent requirements on const_iterator's value_type
Status
c++14
Section
[container.requirements.general]
Submitter
Jeffrey Yasskin

Created on 2011-11-28.00:00:00 last changed 130 months ago

Messages

Date: 2012-11-03.04:16:46

Proposed resolution:

This wording is relative to the FDIS.

Change Table 97 — "Reversible container requirements" as indicated

Table 97 — Reversible container requirements
Expression Return type Assertion/note pre-/post-condition Complexity
X::reverse_-
iterator
iterator type whose value type
is T
reverse_iterator<iterator> compile time
X::const_-
reverse_-
iterator
constant iterator type whose value type
is const T
reverse_iterator<const_iterator> compile time
Date: 2012-11-03.04:16:46

[ 2012, Portland: applied to WP ]

Date: 2012-02-12.18:36:43

[ 2012, Kona ]

Move to Ready.

Date: 2011-12-02.22:32:07

In the FDIS, Table 96 specifies X::const_iterator as a "constant iterator type whose value type is T". However, Table 97 specifies X::const_reverse_iterator as an "iterator type whose value type is const T" and which is defined as reverse_iterator<const_iterator>. But reverse_iterator::value_type is just "typename iterator_traits<Iterator>::value_type" [reverse.iterator], so const_iterator and const_reverse_iterator must have the same value_type.

The resolution to issue 322 implies that const_reverse_iterator should change.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2012-11-03 04:16:46adminsetmessages: + msg6271
2012-10-25 12:46:45adminsetstatus: voting -> wp
2012-10-16 15:35:12adminsetstatus: ready -> voting
2012-02-12 18:36:43adminsetmessages: + msg6003
2012-02-12 18:36:43adminsetstatus: new -> ready
2011-12-02 19:14:56adminsetmessages: + msg5945
2011-11-28 00:00:00admincreate