Browse Source

iterable_adaptor: move iterators on construction

Michele Caini 3 years ago
parent
commit
b92e4f7e65
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/entt/core/iterator.hpp

+ 2 - 2
src/entt/core/iterator.hpp

@@ -78,8 +78,8 @@ struct iterable_adaptor final {
      * @param to End iterator.
      */
     constexpr iterable_adaptor(iterator from, sentinel to)
-        : first{from},
-          last{to} {}
+        : first{std::move(from)},
+          last{std::move(to)} {}
 
     /**
      * @brief Returns an iterator to the beginning.