diff --git a/src/algebra/TinyMatrix.hpp b/src/algebra/TinyMatrix.hpp index df335536bc09929f848693c7dee6924585144a27..e693a70f75771a59ddeed83fab2e4f3b7c5883b0 100644 --- a/src/algebra/TinyMatrix.hpp +++ b/src/algebra/TinyMatrix.hpp @@ -19,7 +19,7 @@ private: PASTIS_FORCEINLINE constexpr size_t _index(const size_t& i, const size_t& j) const noexcept { - return std::move(i*N+j); + return i*N+j; } template <typename... Args> @@ -28,7 +28,7 @@ private: { m_values[N*N-1-sizeof...(args)] = t; if constexpr (sizeof...(args) >0) { - this->_unpackVariadicInput(args...); + this->_unpackVariadicInput(std::forward<Args>(args)...); } } @@ -235,7 +235,7 @@ public: constexpr TinyMatrix(const T& t, Args&&... args) noexcept { static_assert(sizeof...(args)==N*N-1, "wrong number of parameters"); - this->_unpackVariadicInput(t, args...); + this->_unpackVariadicInput(t, std::forward<Args>(args)...); } PASTIS_INLINE diff --git a/src/algebra/TinyVector.hpp b/src/algebra/TinyVector.hpp index 162bcc2d2eb916cfd7ab48dcecd85d86ed1ce643..7b7d407eefa5bd40a0a6cc96bc11d1438ad24093 100644 --- a/src/algebra/TinyVector.hpp +++ b/src/algebra/TinyVector.hpp @@ -23,7 +23,7 @@ class TinyVector { m_values[N-1-sizeof...(args)] = t; if constexpr (sizeof...(args) > 0) { - this->_unpackVariadicInput(args...); + this->_unpackVariadicInput(std::forward<Args>(args)...); } } @@ -200,7 +200,7 @@ class TinyVector constexpr TinyVector(const T& t, Args&&... args) noexcept { static_assert(sizeof...(args)==N-1, "wrong number of parameters"); - this->_unpackVariadicInput(t, args...); + this->_unpackVariadicInput(t, std::forward<Args>(args)...); } PASTIS_INLINE