]> git.sesse.net Git - casparcg/blob - dependencies/boost/boost/spirit/home/phoenix/operator/comparison.hpp
Manually merged pull request #222
[casparcg] / dependencies / boost / boost / spirit / home / phoenix / operator / comparison.hpp
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_OPERATOR_COMPARISON_HPP
8 #define PHOENIX_OPERATOR_COMPARISON_HPP
9
10 #include <boost/spirit/home/phoenix/core/composite.hpp>
11 #include <boost/spirit/home/phoenix/core/compose.hpp>
12 #include <boost/spirit/home/phoenix/detail/type_deduction.hpp>
13 #include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp>
14 #include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp>
15 #include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp>
16 #include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp>
17
18 namespace boost { namespace phoenix
19 {
20     struct equal_to_eval;
21     struct not_equal_to_eval;
22     struct less_eval;
23     struct less_equal_eval;
24     struct greater_eval;
25     struct greater_equal_eval;
26
27     BOOST_BINARY_RESULT_OF(x == y, result_of_equal_to)
28     BOOST_BINARY_RESULT_OF(x != y, result_of_not_equal_to)
29     BOOST_BINARY_RESULT_OF(x < y, result_of_less)
30     BOOST_BINARY_RESULT_OF(x <= y, result_of_less_equal)
31     BOOST_BINARY_RESULT_OF(x > y, result_of_greater)
32     BOOST_BINARY_RESULT_OF(x >= y, result_of_greater_equal)
33
34 #define x a0.eval(env)
35 #define y a1.eval(env)
36
37     PHOENIX_BINARY_EVAL(equal_to_eval, result_of_equal_to, x == y)
38     PHOENIX_BINARY_EVAL(not_equal_to_eval, result_of_not_equal_to, x != y)
39     PHOENIX_BINARY_EVAL(less_eval, result_of_less, x < y)
40     PHOENIX_BINARY_EVAL(less_equal_eval, result_of_less_equal, x <= y)
41     PHOENIX_BINARY_EVAL(greater_eval, result_of_greater, x > y)
42     PHOENIX_BINARY_EVAL(greater_equal_eval, result_of_greater_equal, x >= y)
43
44     PHOENIX_BINARY_COMPOSE(equal_to_eval, ==)
45     PHOENIX_BINARY_COMPOSE(not_equal_to_eval, !=)
46     PHOENIX_BINARY_COMPOSE(less_eval, <)
47     PHOENIX_BINARY_COMPOSE(less_equal_eval, <=)
48     PHOENIX_BINARY_COMPOSE(greater_eval, >)
49     PHOENIX_BINARY_COMPOSE(greater_equal_eval, >=)
50
51 #undef x
52 #undef y
53 }}
54
55 #endif