Closed Lyle-Alloy closed 3 years ago
FWIW, I suspect this was just an accidental omission in the original implementation, caused by P0059's not actually specifying the details of the iterator type (so I and/or Martin were making up the details as we went along). operator->
should be implemented.
(Technically, an iterator can be a C++20 std::random_access_iterator
without supporting operator->
, because Ranges is schizophrenic. But all standard-ish iterators should support operator->
as a matter of QoI.)
Cool! Thanks for teaching me a bit more about iterators as well.
Thanks for the great ring buffer implementation!
You're welcome, glad it's useful :)
Hey there,
I am not usually a C++ developer, but I was wondering if there was any reason that the
->
operator is not implemented.I have some code where I need to access some iterators in the context of a more complicated for loop and it would be very convenient.
It seems that some resources I've read about implementing iterators say to implement it, and some don't mention it.