From 0985bd3c4f43c80b0b0017247e71d81d189ec87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berke=20Kocao=C4=9Flu?= Date: Fri, 13 Oct 2023 19:57:40 +0300 Subject: [PATCH] vecutil.hpp: forward instead of move --- src/cpp/include/vecutil.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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