Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/spirit/home/phoenix/statement/sequence.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 /*============================================================================= | |
2 Copyright (c) 2001-2007 Joel de Guzman | |
3 | |
4 Distributed under the Boost Software License, Version 1.0. (See accompanying | |
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
6 ==============================================================================*/ | |
7 #ifndef PHOENIX_STATEMENT_SEQUENCE_HPP | |
8 #define PHOENIX_STATEMENT_SEQUENCE_HPP | |
9 | |
10 #include <boost/spirit/home/phoenix/core/composite.hpp> | |
11 #include <boost/spirit/home/phoenix/core/compose.hpp> | |
12 | |
13 namespace boost { namespace phoenix | |
14 { | |
15 struct sequence_eval | |
16 { | |
17 template <typename Env, typename A0, typename A1> | |
18 struct result | |
19 { | |
20 typedef void type; | |
21 }; | |
22 | |
23 template <typename RT, typename Env, typename A0, typename A1> | |
24 static void | |
25 eval(Env const& env, A0& a0, A1& a1) | |
26 { | |
27 a0.eval(env); | |
28 a1.eval(env); | |
29 } | |
30 }; | |
31 | |
32 namespace detail | |
33 { | |
34 template <typename BaseT0, typename BaseT1> | |
35 struct comma_result | |
36 { | |
37 typedef actor< | |
38 typename as_composite< | |
39 sequence_eval | |
40 , actor<BaseT0> | |
41 , actor<BaseT1> | |
42 >::type | |
43 > type; | |
44 }; | |
45 } | |
46 | |
47 template <typename BaseT0, typename BaseT1> | |
48 inline typename detail::comma_result<BaseT0, BaseT1>::type | |
49 operator,(actor<BaseT0> const& a0, actor<BaseT1> const& a1) | |
50 { | |
51 return compose<sequence_eval>(a0, a1); | |
52 } | |
53 }} | |
54 | |
55 #endif |