This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofResolved status.
std::reverse_iterator should be a literal typeSection: 24.5.1[reverse.iterators]Status:ResolvedSubmitter: Jeffrey YasskinOpened: 2012-10-30Last modified: 2017-03-12
Priority:3
View all otherissues in [reverse.iterators].
View all issues withResolved status.
Discussion:
std::reverse_iterator::reverse_iterator(Iterator) should be constexprso that other constexpr functions can returnreverse_iterators. Of theother methods, the other constructors,base(),operator+,operator-,operator[], and the non-member operators can probably also beconstexpr.
operator* cannot be constexpr because it involves an assignment to amember variable. Discussion starting with c++std-lib-33282 indicatedthat it would be useful to make reverse_iterator a literal typedespite this restriction on its use at compile time.Proposed resolution:
This issue was Resolved by paperP0031R0adopted at Jacksonville, 2016.