Merge branch 'ErrorFlynn-hotfix-1.7' into hotfix-1.7.2

This commit is contained in:
Jinhao
2019-11-17 01:24:19 +08:00
3 changed files with 11 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ namespace nana
any(Value && value,
typename std::enable_if<!std::is_same<any&, Value>::value>::type * = nullptr,
typename std::enable_if<!std::is_const<Value>::value>::type* = nullptr)
: content_(new holder<typename std::decay<Value>::type>(static_cast<Value&&>(value)))
: content_(new holder<typename std::decay<Value>::type>(std::forward<Value>(value)))
{
}
@@ -87,7 +87,7 @@ namespace nana
template<class Value>
any& operator=(Value&& other)
{
any(other).swap(*this);
any(std::forward<Value>(other)).swap(*this);
return *this;
}