|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80344 - in trunk/boost/fusion/container/deque: . detail
From: joel_at_[hidden]
Date: 2012-08-31 21:04:13
Author: djowel
Date: 2012-08-31 21:04:12 EDT (Fri, 31 Aug 2012)
New Revision: 80344
URL: http://svn.boost.org/trac/boost/changeset/80344
Log:
move-assign for deque
Text files modified:
trunk/boost/fusion/container/deque/deque.hpp | 17 +++++++++++++++++
trunk/boost/fusion/container/deque/detail/cpp03_deque.hpp | 20 ++++++++++++++++++++
trunk/boost/fusion/container/deque/detail/keyed_element.hpp | 17 +++++++++++++++++
3 files changed, 54 insertions(+), 0 deletions(-)
Modified: trunk/boost/fusion/container/deque/deque.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/deque.hpp (original)
+++ trunk/boost/fusion/container/deque/deque.hpp 2012-08-31 21:04:12 EDT (Fri, 31 Aug 2012)
@@ -129,6 +129,23 @@
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
+
};
}}
Modified: trunk/boost/fusion/container/deque/detail/cpp03_deque.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/cpp03_deque.hpp (original)
+++ trunk/boost/fusion/container/deque/detail/cpp03_deque.hpp 2012-08-31 21:04:12 EDT (Fri, 31 Aug 2012)
@@ -133,6 +133,26 @@
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
+
};
}}
Modified: trunk/boost/fusion/container/deque/detail/keyed_element.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/keyed_element.hpp (original)
+++ trunk/boost/fusion/container/deque/detail/keyed_element.hpp 2012-08-31 21:04:12 EDT (Fri, 31 Aug 2012)
@@ -123,6 +123,23 @@
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_;
};
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk