Parcourir la source

More removal of redundant things.

Sam Jaffe il y a 4 ans
Parent
commit
1d265b7341
1 fichiers modifiés avec 2 ajouts et 6 suppressions
  1. 2 6
      include/iterator/recursive/impl.hpp

+ 2 - 6
include/iterator/recursive/impl.hpp

@@ -68,9 +68,7 @@ namespace iterator::recursive {
      * type of the map. Works only for nested collections with one associative
      * container at the bottom level.
      */
-    auto operator*() const -> decltype(*(next_layer &)(*this)) {
-      return next_layer::operator*();
-    }
+    decltype(auto) operator*() const { return next_layer::operator*(); }
     using super::super;
     impl() = default;
   };
@@ -142,9 +140,7 @@ namespace iterator::recursive {
      * type of the map. Works only for nested collections with one associative
      * container at the bottom/Max level.
      */
-    auto operator*() const -> decltype(*(next_layer &)(*this)) {
-      return next_layer::operator*();
-    }
+    decltype(auto) operator*() const { return next_layer::operator*(); }
     using super::super;
     bounded_impl() = default;
   };