Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80458 - in trunk/boost/fusion: adapted/struct/detail container/deque/detail
From: joel_at_[hidden]
Date: 2012-09-08 20:27:38


Author: djowel
Date: 2012-09-08 20:27:37 EDT (Sat, 08 Sep 2012)
New Revision: 80458
URL: http://svn.boost.org/trac/boost/changeset/80458

Log:
- patch from nathan ridge
- fixed deque regression
Text files modified:
   trunk/boost/fusion/adapted/struct/detail/define_struct_inline.hpp | 13 +++++++++----
   trunk/boost/fusion/container/deque/detail/keyed_element.hpp | 4 +++-
   trunk/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp | 9 +++++----
   3 files changed, 17 insertions(+), 9 deletions(-)

Modified: trunk/boost/fusion/adapted/struct/detail/define_struct_inline.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/define_struct_inline.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/define_struct_inline.hpp 2012-09-08 20:27:37 EDT (Sat, 08 Sep 2012)
@@ -203,7 +203,7 @@
     BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \
         NAME, \
         ATTRIBUTES_SEQ, \
- BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ))
+ BOOST_PP_DEC(BOOST_PP_SEQ_SIZE((0)ATTRIBUTES_SEQ)))
 
 #define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \
     NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \
@@ -304,17 +304,22 @@
 #define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL( \
     NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \
                                                                                 \
+ /* Note: second BOOST_PP_IF is necessary to avoid MSVC warning when */ \
+ /* calling BOOST_FUSION_IGNORE_1 with no arguments. */ \
     NAME() \
         BOOST_PP_IF( \
- BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ), \
+ ATTRIBUTES_SEQ_SIZE, \
             BOOST_FUSION_MAKE_DEFAULT_INIT_LIST, \
             BOOST_FUSION_IGNORE_1) \
- (ATTRIBUTES_SEQ) \
+ (BOOST_PP_IF( \
+ ATTRIBUTES_SEQ_SIZE, \
+ ATTRIBUTES_SEQ, \
+ 0)) \
     { \
     } \
                                                                                 \
     BOOST_PP_IF( \
- BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ), \
+ ATTRIBUTES_SEQ_SIZE, \
         BOOST_FUSION_MAKE_COPY_CONSTRUCTOR, \
         BOOST_FUSION_IGNORE_2) \
             (NAME, ATTRIBUTES_SEQ) \

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-09-08 20:27:37 EDT (Sat, 08 Sep 2012)
@@ -93,7 +93,9 @@
             return value_;
         }
 
- keyed_element(Value const& value, Rest const& rest)
+ keyed_element(
+ typename detail::call_param<Value>::type value
+ , Rest const& rest)
             : Rest(rest), value_(value)
         {}
 

Modified: trunk/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp (original)
+++ trunk/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp 2012-09-08 20:27:37 EDT (Sat, 08 Sep 2012)
@@ -38,12 +38,13 @@
             );
         }
 
- static type forward_(Head&& head, Tail&&... tail)
+ template <typename Head_, typename ...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)...)
+ std::forward<Head_>(head)
+ , deque_keyed_values_impl<next_index, Tail_...>::
+ forward_(std::forward<Tail_>(tail)...)
             );
         }
     };


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