Merge from trunk

[SVN r79274]
This commit is contained in:
Joel de Guzman
2012-07-05 04:40:37 +00:00
parent bcb5fd9618
commit 5a51e5d9aa
58 changed files with 1566 additions and 183 deletions

View File

@ -9,6 +9,8 @@
#include <boost/fusion/algorithm/iteration/accumulate_fwd.hpp>
#include <boost/fusion/algorithm/iteration/fold.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion
{
@ -23,14 +25,24 @@ namespace boost { namespace fusion
}
template <typename Sequence, typename State, typename F>
inline typename result_of::accumulate<Sequence, State const, F>::type
inline
typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::accumulate<Sequence, State const, F>
>::type
accumulate(Sequence& seq, State const& state, F f)
{
return fusion::fold(seq, state, f);
}
template <typename Sequence, typename State, typename F>
inline typename result_of::accumulate<Sequence const, State const, F>::type
inline
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)
{
return fusion::fold(seq, state, f);