From 61bf0151dad0053151e91c585601b2cab5c29993 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Wed, 19 Dec 2007 10:33:14 +0000 Subject: [PATCH] bug fix for end_impl. [SVN r42164] --- .../boost/fusion/adapted/struct/adapt_assoc_struct.hpp | 6 +++--- include/boost/fusion/adapted/struct/detail/end_impl.hpp | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp b/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp index e621187f..c355d4b3 100644 --- a/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp +++ b/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp @@ -53,7 +53,7 @@ namespace boost { namespace fusion { namespace extension { // 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 @@ namespace boost { namespace fusion { namespace extension { { \ template <> \ struct struct_size : mpl::int_ {}; \ - 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 \ { \ diff --git a/include/boost/fusion/adapted/struct/detail/end_impl.hpp b/include/boost/fusion/adapted/struct/detail/end_impl.hpp index 42d7f394..ffb2e77d 100644 --- a/include/boost/fusion/adapted/struct/detail/end_impl.hpp +++ b/include/boost/fusion/adapted/struct/detail/end_impl.hpp @@ -9,6 +9,7 @@ #define BOOST_FUSION_END_IMPL_24122005_1755 #include +#include namespace boost { namespace fusion { @@ -25,7 +26,12 @@ namespace boost { namespace fusion template struct apply { - typedef struct_iterator type; + typedef + struct_iterator< + Sequence + , size_impl::template apply::value + > + type; static type call(Sequence& v)