Closed greenwald closed 8 years ago
Is the VectorIterator
constructor supposed to be public?
Is there a reason for it not to be?
I don't know. I asked because the DataIterator
one is protected
.
For the moment leave them as is, I think.
Is this the correct implementation of the pointer operator in DataIterator
?
DataPoint operator->()
{ return *(this->Iterator_).operator->(); }
Should it return a (const
) reference instead of the object itself?
Since it is accessing the pointer to the object inside the iterator since it's a wrapper around another iterator, yes.
As to the const
'ness: there should be both a const
and nonconst
version, I suppose. Check the standard.
On Mon, Jun 13, 2016 at 4:05 PM pdigiglio notifications@github.com wrote:
Is this the correct implementation of the pointer operator in DataIterator ?
DataPoint operator->() { return *(this->Iterator_).operator->(); }
Should it return a (const) reference instead of the object itself?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yap/YAP/issues/37#issuecomment-225590761, or mute the thread https://github.com/notifications/unsubscribe/ACc8EfXdMpDg4cq3GlOxVGr68VZL1UbRks5qLWOtgaJpZM4Iv2q0 .
Daniel Greenwald Physik-Department E18 Technische Universität München James-Franck-Str. 1 85748 Garching Germany
daniel.greenwald@tum.de tel : +49 89 / 289 12569 fax : +49 89 / 289 12570
Closed by #57
DataIterator
should fulfill all requirements of http://en.cppreference.com/w/cpp/concept/RandomAccessIterator