#454 cast from GenericIterator to const GenericIterator broken
Metadata
Property | Value |
---|---|
Reported by | Martin Nolte (nolte@mathematik.uni-freiburg.de) |
Reported at | Nov 7, 2008 06:30 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
Last edited at | Dec 2, 2008 10:45 |
Closed by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
Closed at | Dec 2, 2008 10:45 |
Closed in version | 1.2 |
Resolution | Fixed |
Comment |
Description
Adding a template parameter for the reference in revision 5345 broke the implicit cast from a GenericIterator to a const GenericIterator.
The problem is that GenericIterator< const C, const T > sets R=const T& while the mutable iterator GenericIterator< C, T > sets R=T& and uses this R in the copy constructors (and in equals, distanceTo).
See iteratorfacestest for details (yes, it fails).
PS: Why does distanceTo copy the iterator instead of taking a const reference?