diff --git a/src/util/ue2_containers.h b/src/util/ue2_containers.h index 91115b18..0292741c 100644 --- a/src/util/ue2_containers.h +++ b/src/util/ue2_containers.h @@ -58,8 +58,8 @@ class iter_wrapper : public boost::iterator_facade, Value, boost::random_access_traversal_tag> { public: - iter_wrapper() {} - explicit iter_wrapper(const WrappedIter &it_in) : it(it_in) {} + iter_wrapper() = default; + explicit iter_wrapper(WrappedIter it_in) : it(std::move(it_in)) {} // Templated copy-constructor to allow for interoperable iterator and // const_iterator. @@ -68,10 +68,10 @@ private: public: template - iter_wrapper(const iter_wrapper &other, + iter_wrapper(iter_wrapper other, typename std::enable_if::value>::type * = nullptr) - : it(other.it) {} + : it(std::move(other.it)) {} WrappedIter get() const { return it; }