forked from boostorg/fusion
move-assign for deque
[SVN r80344]
This commit is contained in:
@ -129,6 +129,23 @@ namespace boost { namespace fusion
|
||||
base::operator=(rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||
template <typename ...Elements>
|
||||
deque& operator=(deque<Elements...>&& rhs)
|
||||
{
|
||||
base::operator=(std::forward<deque<Elements...>>(rhs));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
deque& operator=(T&& rhs)
|
||||
{
|
||||
base::operator=(std::forward<T>(rhs));
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
}}
|
||||
|
||||
|
@ -133,6 +133,26 @@ namespace boost { namespace fusion {
|
||||
base::operator=(rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
|
||||
deque&
|
||||
operator=(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& rhs)
|
||||
{
|
||||
base::operator=(std::forward<
|
||||
deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(rhs));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
deque&
|
||||
operator=(T&& rhs)
|
||||
{
|
||||
base::operator=(std::forward<T>(rhs));
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
}}
|
||||
|
||||
|
@ -123,6 +123,23 @@ namespace boost { namespace fusion { namespace detail
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||
template<typename U, typename Rst>
|
||||
keyed_element& operator=(keyed_element<Key, U, Rst>&& rhs)
|
||||
{
|
||||
base::operator=(std::forward<keyed_element<Key, U, Rst>>(rhs));
|
||||
value_ = std::forward<U>(rhs.value_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
keyed_element& operator=(keyed_element&& rhs)
|
||||
{
|
||||
base::operator=(std::forward<keyed_element>(rhs));
|
||||
value_ = std::forward<Value>(rhs.value_);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
Value value_;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user