diff --git a/src/cpp/include/vecutil.hpp b/src/cpp/include/vecutil.hpp index 2c8dfff5..c1a1d6c5 100644 --- a/src/cpp/include/vecutil.hpp +++ b/src/cpp/include/vecutil.hpp @@ -13,7 +13,7 @@ namespace xph::vec { inline std::vector setindex(std::vector&& vec, const std::size_t idx, const T& val) { vec[idx] = val; - return std::move(vec); + return std::forward(vec); } template @@ -23,7 +23,7 @@ namespace xph::vec { inline std::vector setindex(std::vector&& vec, const std::size_t idx, const T&& val) { vec[idx] = val; - return std::move(vec); + return std::forward(vec); } template @@ -33,7 +33,7 @@ namespace xph::vec { inline std::vector setindex(std::vector&& vec, const std::size_t&& idx, const T& val) { vec[idx] = val; - return std::move(vec); + return std::forward(vec); } template @@ -43,7 +43,7 @@ namespace xph::vec { inline std::vector setindex(std::vector&& vec, const std::size_t&& idx, const T&& val) { vec[idx] = val; - return std::move(vec); + return std::forward(vec); } } // namespace xph::vec