#827 rbegin of FieldVector and ISTL classes has surprising semantics
Metadata
Property | Value |
---|---|
Reported by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
Reported at | Oct 12, 2010 08:25 |
Type | Bug Report |
Version | 2.0 |
Operating System | Unspecified / All |
Last edited by | Markus Blatt (markus@dr-blatt.de) |
Last edited at | Dec 1, 2010 17:06 |
Closed by | Markus Blatt (markus@dr-blatt.de) |
Closed at | Dec 1, 2010 17:06 |
Closed in version | Unknown |
Resolution | Implemented |
Comment | Implemented as discussed in |
dune-common rev 6286 and dune-istl rev. 1414 |
Description
The methods rbegin() and rend() of FieldVector, DenseVector, DynamicVector and the classes in ISTL return an Iterator. The usual behaviour of this method would be to return a reverse_iterator. The main difference is, that the iterator has to be decremented using '--', while the reverse_iterator is decremented using '++'.
This behaviour may come as a big surprise to new users. I do understand, the current behaviour is needed in ISTL, thus I do not want to suggest to remove this feature, but I suggest to rename the methods to avoid additional confusion. Renaming the methods should be fairly simple.
Opinions?