If I perform a transform view operation I noticed that the view iterator does not support the operator->. So in code terms
void transform_view( )
{
struct Z { int a; };
std::ranges::single_view view { Z { 99 } };
auto transform_view { std::ranges::views::transform( view, []( auto const& z ){ return Z { z.a + 10 }; } ) };
// The operator-> does not compile here as there is none defined
// auto transform_view_first_value { transform_view.begin( )->a };
}
This is "as expected" as the standard in 24.7.6.3 which defines range.transform.iterator does not have an operator->.
I found this a bit surprising and tried to understand why it would not have one. I could not find and overiew in the standard or various web places of what is generally expected of view iterators and why in particular there is no operator-> on at least some of them.
Does anyone know the answer or a good source of information on this?