mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-21 08:12:39 +02:00
added version of fold (overload) accepting non-const State.
[SVN r71179]
This commit is contained in:
@ -425,6 +425,34 @@ namespace boost { namespace fusion
|
|||||||
fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq),
|
fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq),
|
||||||
f);
|
f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||||
|
Seq
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
BOOST_FUSION_FOLD_NAME(Seq& seq, State& state, F f)
|
||||||
|
{
|
||||||
|
return result_of::BOOST_FUSION_FOLD_NAME<Seq,State,F>::call(
|
||||||
|
state,
|
||||||
|
fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq),
|
||||||
|
f);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Seq, typename State, typename F>
|
||||||
|
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||||
|
Seq const
|
||||||
|
, State const
|
||||||
|
, F
|
||||||
|
>::type
|
||||||
|
BOOST_FUSION_FOLD_NAME(Seq const& seq, State& state, F f)
|
||||||
|
{
|
||||||
|
return result_of::BOOST_FUSION_FOLD_NAME<Seq const,State,F>::call(
|
||||||
|
state,
|
||||||
|
fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq),
|
||||||
|
f);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#undef BOOST_FUSION_FOLD_NAME
|
#undef BOOST_FUSION_FOLD_NAME
|
||||||
|
Reference in New Issue
Block a user