annotate DEPENDENCIES/generic/include/boost/spirit/home/phoenix/statement/sequence.hpp @ 46:d572322e2efe
Fix to .cat file check (was susceptible to DOS line-endings) and subrepo update
author |
Chris Cannam |
date |
Thu, 07 Aug 2014 14:39:38 +0100 |
parents |
2665513ce2d3 |
children |
|
rev |
line source |
Chris@16
|
1 /*=============================================================================
|
Chris@16
|
2 Copyright (c) 2001-2007 Joel de Guzman
|
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 #ifndef PHOENIX_STATEMENT_SEQUENCE_HPP
|
Chris@16
|
8 #define PHOENIX_STATEMENT_SEQUENCE_HPP
|
Chris@16
|
9
|
Chris@16
|
10 #include <boost/spirit/home/phoenix/core/composite.hpp>
|
Chris@16
|
11 #include <boost/spirit/home/phoenix/core/compose.hpp>
|
Chris@16
|
12
|
Chris@16
|
13 namespace boost { namespace phoenix
|
Chris@16
|
14 {
|
Chris@16
|
15 struct sequence_eval
|
Chris@16
|
16 {
|
Chris@16
|
17 template <typename Env, typename A0, typename A1>
|
Chris@16
|
18 struct result
|
Chris@16
|
19 {
|
Chris@16
|
20 typedef void type;
|
Chris@16
|
21 };
|
Chris@16
|
22
|
Chris@16
|
23 template <typename RT, typename Env, typename A0, typename A1>
|
Chris@16
|
24 static void
|
Chris@16
|
25 eval(Env const& env, A0& a0, A1& a1)
|
Chris@16
|
26 {
|
Chris@16
|
27 a0.eval(env);
|
Chris@16
|
28 a1.eval(env);
|
Chris@16
|
29 }
|
Chris@16
|
30 };
|
Chris@16
|
31
|
Chris@16
|
32 namespace detail
|
Chris@16
|
33 {
|
Chris@16
|
34 template <typename BaseT0, typename BaseT1>
|
Chris@16
|
35 struct comma_result
|
Chris@16
|
36 {
|
Chris@16
|
37 typedef actor<
|
Chris@16
|
38 typename as_composite<
|
Chris@16
|
39 sequence_eval
|
Chris@16
|
40 , actor<BaseT0>
|
Chris@16
|
41 , actor<BaseT1>
|
Chris@16
|
42 >::type
|
Chris@16
|
43 > type;
|
Chris@16
|
44 };
|
Chris@16
|
45 }
|
Chris@16
|
46
|
Chris@16
|
47 template <typename BaseT0, typename BaseT1>
|
Chris@16
|
48 inline typename detail::comma_result<BaseT0, BaseT1>::type
|
Chris@16
|
49 operator,(actor<BaseT0> const& a0, actor<BaseT1> const& a1)
|
Chris@16
|
50 {
|
Chris@16
|
51 return compose<sequence_eval>(a0, a1);
|
Chris@16
|
52 }
|
Chris@16
|
53 }}
|
Chris@16
|
54
|
Chris@16
|
55 #endif
|