This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++14 status.
2105. Inconsistent requirements onconst_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(i) 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
Table 97 — Reversible container requirements Expression Return type Assertion/note pre-/post-condition ComplexityX::reverse_-
iterator
iterator type whose value type
T
reverse_iterator<iterator>
compile time X::const_-
reverse_-
iterator
constant iterator type whose value type
const T
reverse_iterator<const_iterator>
compile time
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4