Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80334 - in trunk/boost/fusion/container/deque: . detail
From: joel_at_[hidden]
Date: 2012-08-31 11:58:32


Author: djowel
Date: 2012-08-31 11:58:31 EDT (Fri, 31 Aug 2012)
New Revision: 80334
URL: http://svn.boost.org/trac/boost/changeset/80334

Log:
deque move-ctor OK on gcc
Text files modified:
   trunk/boost/fusion/container/deque/deque.hpp | 26 ++++++++++++++++++--------
   trunk/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp | 16 +++++++++++++---
   trunk/boost/fusion/container/deque/detail/keyed_element.hpp | 3 +++
   3 files changed, 34 insertions(+), 11 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 11:58:31 EDT (Fri, 31 Aug 2012)
@@ -71,6 +71,11 @@
           : base(seq)
         {}
 
+ template <typename ...Elements>
+ deque(deque<Elements...>& seq)
+ : base(seq)
+ {}
+
 #if !defined(BOOST_NO_RVALUE_REFERENCES)
         template <typename ...Elements>
         deque(deque<Elements...>&& seq)
@@ -89,16 +94,21 @@
 #endif
 
         explicit deque(Head const& head, Tail const&... tail)
- : base(detail::deque_keyed_values<Head, Tail...>::call(head, tail...))
+ : base(detail::deque_keyed_values<Head, Tail...>::construct(head, tail...))
         {}
 
-//~ #if !defined(BOOST_NO_RVALUE_REFERENCES)
- //~ template <typename Head_, typename ...Tail_>
- //~ explicit deque(Head_&& head, Tail_&&... tail)
- //~ : base(detail::deque_keyed_values<Head_, Tail_...>
- //~ ::call(std::forward<Head_>(head), std::forward<Tail_>(tail)...))
- //~ {}
-//~ #endif
+ template <typename Head_, typename ...Tail_>
+ explicit deque(Head_ const& head, Tail_ const&... tail)
+ : base(detail::deque_keyed_values<Head_, Tail_...>::construct(head, tail...))
+ {}
+
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
+ template <typename Head_, typename ...Tail_>
+ explicit deque(Head_&& head, Tail_&&... tail)
+ : base(detail::deque_keyed_values<Head, Tail...>
+ ::forward_(std::forward<Head_>(head), std::forward<Tail_>(tail)...))
+ {}
+#endif
 
         template <typename Sequence>
         explicit deque(Sequence const& seq

Modified: trunk/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp (original)
+++ trunk/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp 2012-08-31 11:58:31 EDT (Fri, 31 Aug 2012)
@@ -28,13 +28,22 @@
         typedef typename deque_keyed_values_impl<next_index, Tail...>::type tail;
         typedef keyed_element<N, Head, tail> type;
 
- static type call(
+ static type construct(
           typename detail::call_param<Head>::type head
         , typename detail::call_param<Tail>::type... tail)
         {
             return type(
                 head
- , deque_keyed_values_impl<next_index, Tail...>::call(tail...)
+ , deque_keyed_values_impl<next_index, Tail...>::construct(tail...)
+ );
+ }
+
+ static type forward_(Head&& head, Tail&&... tail)
+ {
+ return type(
+ std::forward<Head>(head)
+ , deque_keyed_values_impl<next_index, Tail...>::
+ forward_(std::forward<Tail>(tail)...)
             );
         }
     };
@@ -45,7 +54,8 @@
     struct deque_keyed_values_impl<N>
     {
         typedef nil_keyed_element type;
- static type call() { return type(); }
+ static type construct() { return type(); }
+ static type forward_() { return type(); }
     };
 
     template <typename ...Elements>

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 11:58:31 EDT (Fri, 31 Aug 2012)
@@ -63,6 +63,9 @@
           : Rest(rhs.get_base()), value_(rhs.value_)
         {}
 
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
+#endif
+
         Rest& get_base()
         {
             return *this;


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