From 7ba53d33ce6baf75df6d6cbeff59f7cd4eec0e39 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Wed, 25 Oct 2006 05:27:43 +0000 Subject: [PATCH] minor bug fixes [SVN r35735] --- .../sequence/view/ext_/segmented_iterator.hpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/boost/fusion/sequence/view/ext_/segmented_iterator.hpp b/include/boost/fusion/sequence/view/ext_/segmented_iterator.hpp index f242aa43..acde578c 100755 --- a/include/boost/fusion/sequence/view/ext_/segmented_iterator.hpp +++ b/include/boost/fusion/sequence/view/ext_/segmented_iterator.hpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,11 @@ namespace boost { namespace fusion > {}; + template + struct is_empty + : is_empty + {}; + struct segmented_range_tag; //////////////////////////////////////////////////////////////////////////// @@ -48,6 +54,7 @@ namespace boost { namespace fusion struct segmented_range : sequence_base > { + BOOST_MPL_ASSERT_NOT((is_reference)); typedef mpl::bool_ is_segmented; typedef segmented_range_tag fusion_tag; typedef fusion_sequence_tag tag; // this gets picked up by MPL @@ -194,7 +201,8 @@ namespace boost { namespace fusion static type call(Sequence &seq) { - return type(fusion::segments(seq)); + segments segs(fusion::segments(seq)); + return type(segs); } }; @@ -239,7 +247,8 @@ namespace boost { namespace fusion static type call(Sequence &seq, State const &state) { range rng(as_segmented_range::call(seq)); - return push::call(*fusion::begin(rng), fusion::make_cons(rng, state)); + next_ref nxt(*fusion::begin(rng)); + return push::call(nxt, fusion::make_cons(rng, state)); } };