forked from boostorg/fusion
Overhaul the fusion::fold family to make SFINAE-friendly.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2015 Kohei Takahashi
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
@ -10,8 +11,6 @@
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#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
|
||||
{
|
||||
@ -27,11 +26,7 @@ namespace boost { namespace fusion
|
||||
|
||||
template <typename Sequence, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename
|
||||
lazy_enable_if<
|
||||
traits::is_sequence<Sequence>
|
||||
, result_of::accumulate<Sequence, State const, F>
|
||||
>::type
|
||||
inline typename result_of::accumulate<Sequence, State const, F>::type
|
||||
accumulate(Sequence& seq, State const& state, F f)
|
||||
{
|
||||
return fusion::fold(seq, state, f);
|
||||
@ -39,11 +34,7 @@ namespace boost { namespace fusion
|
||||
|
||||
template <typename Sequence, typename State, typename F>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename
|
||||
lazy_enable_if<
|
||||
traits::is_sequence<Sequence>
|
||||
, result_of::accumulate<Sequence const, State const, F>
|
||||
>::type
|
||||
inline typename result_of::accumulate<Sequence const, State const, F>::type
|
||||
accumulate(Sequence const& seq, State const& state, F f)
|
||||
{
|
||||
return fusion::fold(seq, state, f);
|
||||
|
Reference in New Issue
Block a user