map move supported + value_at_impl added

[SVN r82726]
This commit is contained in:
Joel de Guzman
2013-02-04 11:52:58 +00:00
parent 085c3c25ca
commit 9672fe5385
3 changed files with 90 additions and 2 deletions

View File

@ -28,9 +28,26 @@ namespace boost { namespace fusion
pair()
: second() {}
pair(pair const& rhs)
: second(rhs.second) {}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
pair(pair&& rhs)
: second(std::forward<Second>(rhs.second)) {}
#endif
pair(typename detail::call_param<Second>::type val)
: second(val) {}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename Second2>
pair(Second2&& val
, typename boost::enable_if<is_convertible<Second2, Second> >::type* /*dummy*/ = 0
) : second(std::forward<Second2>(val)) {}
#endif
template <typename Second2>
pair(pair<First, Second2> const& rhs)
: second(rhs.second) {}
@ -48,6 +65,14 @@ namespace boost { namespace fusion
return *this;
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
pair& operator=(pair&& rhs)
{
second = std::forward<Second>(rhs.second);
return *this;
}
#endif
typedef First first_type;
typedef Second second_type;
Second second;