Since we're not (yet?) doing Range-V3 style "deep integration", hacking into std::iterator_traits, we need to provide all 5 typedefs in our new view iterators to use them with legacy algorithms -- or, more usefully, with container contructors.
They all have value_type, difference_type and iterator_category typedefs already, so this commit adds reference (defined to be the return type of op*) and pointer (defined to be the return type of op-> where that exists, else void).
Only the views which (can potentially) return the same type for begin() and end() need these -- others (such as istream_view) must be routed through common_iterator, which already provides the necessary typedefs.
Also, add some tests to make sure range conversion works as expected.
Since we're not (yet?) doing Range-V3 style "deep integration", hacking into std::iterator_traits, we need to provide all 5 typedefs in our new view iterators to use them with legacy algorithms -- or, more usefully, with container contructors.
They all have value_type, difference_type and iterator_category typedefs already, so this commit adds reference (defined to be the return type of op*) and pointer (defined to be the return type of op-> where that exists, else void).
Only the views which (can potentially) return the same type for begin() and end() need these -- others (such as istream_view) must be routed through common_iterator, which already provides the necessary typedefs.
Also, add some tests to make sure range conversion works as expected.