diff --git a/vector/src/utility.hpp b/vector/src/utility.hpp index 4d13ee5..aa895ab 100644 --- a/vector/src/utility.hpp +++ b/vector/src/utility.hpp @@ -15,11 +15,11 @@ public: pair(pair &&other) = default; pair(const T1 &x, const T2 &y) : first(x), second(y) {} template - pair(U1 &&x, U2 &&y) : first(x), second(y) {} + pair(U1 &&x, U2 &&y) : first(std::forward(x)), second(std::forward(y)) {} template pair(const pair &other) : first(other.first), second(other.second) {} template - pair(pair &&other) : first(other.first), second(other.second) {} + pair(pair &&other) : first(std::move(other.first)), second(std::move(other.second)) {} }; }