Skip to content

Commit

Permalink
use std::forward<T> for perfect forwarding (via @DennisOSRM)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemp committed Oct 20, 2014
1 parent 804fb6f commit eb99515
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ class variant
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;
}
Expand Down

1 comment on commit eb99515

@DennisOSRM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.