segmented_fold_until should unpack the state's value before invoking the user's function

[SVN r73668]
This commit is contained in:
Eric Niebler
2011-08-11 17:28:17 +00:00
parent 3af35683ff
commit b83a2954f5
3 changed files with 8 additions and 5 deletions

View File

@ -23,7 +23,7 @@ namespace boost { namespace fusion { namespace detail
{
typedef
fusion::result<
typename result_of::fold<Range, typename State::value_type, Fun>::type,
typename result_of::fold<Range, State, Fun>::type,
continue_
>
type;
@ -37,7 +37,7 @@ namespace boost { namespace fusion { namespace detail
typename result<segmented_fold_fun(Range&, State const&, Context const&)>::type
operator()(Range& rng, State const& state, Context const&) const
{
return fusion::fold(rng, state.value, fun);
return fusion::fold(rng, state, fun);
}
Fun const& fun;