Boost logo

Boost-Commit :

From: joel_at_[hidden]
Date: 2007-12-19 05:33:14


Author: djowel
Date: 2007-12-19 05:33:14 EST (Wed, 19 Dec 2007)
New Revision: 42164
URL: http://svn.boost.org/trac/boost/changeset/42164

Log:
bug fix for end_impl.
Text files modified:
   trunk/boost/fusion/adapted/struct/adapt_assoc_struct.hpp | 6 +++---
   trunk/boost/fusion/adapted/struct/detail/end_impl.hpp | 8 +++++++-
   2 files changed, 10 insertions(+), 4 deletions(-)

Modified: trunk/boost/fusion/adapted/struct/adapt_assoc_struct.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/adapt_assoc_struct.hpp (original)
+++ trunk/boost/fusion/adapted/struct/adapt_assoc_struct.hpp 2007-12-19 05:33:14 EST (Wed, 19 Dec 2007)
@@ -53,7 +53,7 @@
 // SEQ_FOR_EACH_I to generate the "linear" substructures.
 // Thanks to Paul Mensonides for the PP macro help
 
-#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_I(name, seq) \
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_I(name, seq) \
     namespace boost { namespace fusion { namespace traits \
     { \
         template <> \
@@ -66,11 +66,11 @@
     { \
         template <> \
         struct struct_size<name> : mpl::int_<BOOST_PP_SEQ_SIZE(seq)> {}; \
- BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_ADAPT_ASSOC_STRUCT_C, name, seq) \
+ BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_ADAPT_ASSOC_STRUCT_C, name, seq) \
     }}} \
     /***/
 
-#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C(r, name, i, xy) \
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C(r, name, i, xy) \
     template <> \
     struct struct_member<name, i> \
     { \

Modified: trunk/boost/fusion/adapted/struct/detail/end_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/end_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/end_impl.hpp 2007-12-19 05:33:14 EST (Wed, 19 Dec 2007)
@@ -9,6 +9,7 @@
 #define BOOST_FUSION_END_IMPL_24122005_1755
 
 #include <boost/fusion/adapted/struct/struct_iterator.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
 
 namespace boost { namespace fusion
 {
@@ -25,7 +26,12 @@
             template <typename Sequence>
             struct apply
             {
- typedef struct_iterator<Sequence, 2> type;
+ typedef
+ struct_iterator<
+ Sequence
+ , size_impl<struct_tag>::template apply<Sequence>::value
+ >
+ type;
 
                 static type
                 call(Sequence& v)


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