update variant.hpp (use std::forward<T> for perfect forwarding - via @DennisOSRM)

This commit is contained in:
artemp 2014-10-20 15:48:47 +01:00
parent 29c8ba5ef6
commit 1ed3d24193

View file

@ -580,7 +580,7 @@ public:
template <typename T>
VARIANT_INLINE variant<Types...>& operator=(T && rhs) noexcept
{
variant<Types...> temp(std::move(rhs));
variant<Types...> temp(std::forward<T>(rhs));
swap(*this, temp);
return *this;
}