Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
4.8.6, 5.0.2, 5.1.1, 5.2.1, 5.3.2, 5.4.1, 5.5.0
-
None
-
ffedd0cf640ca75602bdb8151256636d22de413d (QVector), f7b5f0cfd292baad7a18f1b83567133756ff1d2c (QList), cc164f9ac73cd44a0ab082af78dccde8057154dc (QVarLengthArray)
Description
Hello.
As you know, there are begin and end methods (which return reverse_iterator and const_reverse_iterator objects) in QString and Qt container classes that provide STL compatibility. But Qt seems to be missing reverse iterators. Think of std::string::rbegin and std::string::rend methods.
This is a powerful feature that I used to use a lot, and I'm pretty sure that I'm not the only one
It would be really nice to introduce reverse iterators into Qt containers (wherever it is possible) and QString to increase flexibility and amount of possibilities to use the STL algorithms.
Thanks in advance
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-25919 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
109628,3 | QVector: add {const_,}reverse_iterator, {c,}r{begin,end}() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
109850,2 | QList: add {const_,reverse_iterator}, {c,}r{begin,end}() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
109864,3 | QVarLengthArray: add {const_,reverse_iterator}, {c,}r{begin,end}() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
109931,3 | QString: add {const_,reverse_iterator}, {c,}r{begin,end}() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
109933,3 | QByteArray: add {const_,reverse_iterator}, {c,}r{begin,end}() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
127144,3 | QLinkedList/QSet: add {const_,}reverse_iterator, {c,}r{begin,end}() | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |