File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,6 +78,9 @@ namespace iter {
7878 private:
7979 MapFunc map_func;
8080 ZippedType zipped;
81+
82+ using IMapIterDeref = decltype (detail::call_with_tuple(
83+ map_func, *std::begin (zipped)));
8184
8285 // Value constructor for use only in the imap function
8386 IMap (MapFunc map_func, Containers&& ... containers) :
@@ -91,7 +94,9 @@ namespace iter {
9194 IMap (const IMap&) = default;
9295 IMap (IMap&&) = default;
9396
94- class Iterator {
97+ class Iterator
98+ : public std::iterator<std::input_iterator_tag, IMapIterDeref>
99+ {
95100 private:
96101 MapFunc map_func;
97102 ZippedIterType zipiter;
@@ -102,10 +107,7 @@ namespace iter {
102107 zipiter (zipiter)
103108 { }
104109
105- auto operator *() ->
106- decltype (detail::call_with_tuple(
107- this ->map_func, *(this ->zipiter)))
108- {
110+ IMapIterDeref operator *() {
109111 return detail::call_with_tuple (
110112 this ->map_func , *(this ->zipiter ));
111113 }
You can’t perform that action at this time.
0 commit comments