const_iterator
's value_type
Section: 23.2.2 [container.requirements.general] Status: C++14 Submitter: Jeffrey Yasskin Opened: 2011-11-28 Last modified: 2016-01-28
Priority: Not Prioritized
View other active issues in [container.requirements.general].
View all other issues in [container.requirements.general].
View all issues with C++14 status.
Discussion:
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
" 24.5.1.2 [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.
[2012, Kona]
Move to Ready.
[2012, Portland: applied to WP]
Proposed resolution:
This wording is relative to the FDIS.
Change Table 97 — "Reversible container requirements" as indicated
Expression | Return type | Assertion/note pre-/post-condition | Complexity |
---|---|---|---|
X::reverse_-
|
iterator type whose value type is T
|
reverse_iterator<iterator>
|
compile time |
X::const_-
|
constant iterator type whose value type is
|
reverse_iterator<const_iterator>
|
compile time |