Chris@16
|
1 /*=============================================================================
|
Chris@16
|
2 Copyright (c) 2011 Eric Niebler
|
Chris@16
|
3
|
Chris@16
|
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 ==============================================================================*/
|
Chris@16
|
7
|
Chris@16
|
8 #ifndef BOOST_FUSION_ALGORITHM_ITERATION_FOLD_FWD_HPP
|
Chris@16
|
9 #define BOOST_FUSION_ALGORITHM_ITERATION_FOLD_FWD_HPP
|
Chris@16
|
10
|
Chris@16
|
11 namespace boost { namespace fusion
|
Chris@16
|
12 {
|
Chris@16
|
13 namespace result_of
|
Chris@16
|
14 {
|
Chris@16
|
15 template<typename Seq, typename State, typename F>
|
Chris@16
|
16 struct fold;
|
Chris@16
|
17 }
|
Chris@16
|
18
|
Chris@16
|
19 template<typename Seq, typename State, typename F>
|
Chris@101
|
20 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@101
|
21 inline typename result_of::fold<
|
Chris@16
|
22 Seq
|
Chris@16
|
23 , State const
|
Chris@16
|
24 , F
|
Chris@16
|
25 >::type
|
Chris@16
|
26 fold(Seq& seq, State const& state, F f);
|
Chris@16
|
27
|
Chris@16
|
28 template<typename Seq, typename State, typename F>
|
Chris@101
|
29 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@101
|
30 inline typename result_of::fold<
|
Chris@16
|
31 Seq const
|
Chris@16
|
32 , State const
|
Chris@16
|
33 , F
|
Chris@16
|
34 >::type
|
Chris@16
|
35 fold(Seq const& seq, State const& state, F f);
|
Chris@16
|
36
|
Chris@16
|
37 template<typename Seq, typename State, typename F>
|
Chris@101
|
38 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@101
|
39 inline typename result_of::fold<
|
Chris@16
|
40 Seq
|
Chris@16
|
41 , State const
|
Chris@16
|
42 , F
|
Chris@16
|
43 >::type
|
Chris@16
|
44 fold(Seq& seq, State& state, F f);
|
Chris@16
|
45
|
Chris@16
|
46 template<typename Seq, typename State, typename F>
|
Chris@101
|
47 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@101
|
48 inline typename result_of::fold<
|
Chris@16
|
49 Seq const
|
Chris@16
|
50 , State const
|
Chris@16
|
51 , F
|
Chris@16
|
52 >::type
|
Chris@16
|
53 fold(Seq const& seq, State& state, F f);
|
Chris@16
|
54 }}
|
Chris@16
|
55
|
Chris@16
|
56 #endif
|