diff options
Diffstat (limited to 'boost/fusion/algorithm/iteration/accumulate_fwd.hpp')
-rw-r--r-- | boost/fusion/algorithm/iteration/accumulate_fwd.hpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/boost/fusion/algorithm/iteration/accumulate_fwd.hpp b/boost/fusion/algorithm/iteration/accumulate_fwd.hpp index 9c0bd115fb..a4ca316c1e 100644 --- a/boost/fusion/algorithm/iteration/accumulate_fwd.hpp +++ b/boost/fusion/algorithm/iteration/accumulate_fwd.hpp @@ -7,6 +7,9 @@ #if !defined(BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED) #define BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/utility/enable_if.hpp> + namespace boost { namespace fusion { namespace result_of @@ -16,11 +19,19 @@ namespace boost { namespace fusion } template <typename Sequence, typename State, typename F> - typename result_of::accumulate<Sequence, State const, F>::type + typename + lazy_enable_if< + traits::is_sequence<Sequence> + , result_of::accumulate<Sequence, State const, F> + >::type accumulate(Sequence& seq, State const& state, F f); template <typename Sequence, typename State, typename F> - typename result_of::accumulate<Sequence const, State const, F>::type + typename + lazy_enable_if< + traits::is_sequence<Sequence> + , result_of::accumulate<Sequence const, State const, F> + >::type accumulate(Sequence const& seq, State const& state, F f); }} |