Return value of operator* should be reference/const_reference
fuchsto opened this issue · 0 comments
fuchsto commented
RVO will probably save your derrière but you have to define reference
for iterator traits to work anyways:
Well, or use decltype(auto)
. Actually you are missing all iterator member types required by iterator traits:
https://de.cppreference.com/w/cpp/iterator/iterator_traits
Namely:
Iterator::difference_type
Iterator::value_type
Iterator::pointer
Iterator::reference
Iterator::iterator_category