Imported Upstream version 1.51.0
[platform/upstream/boost.git] / boost / spirit / home / phoenix / operator / detail / binary_compose.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_DETAIL_BINARY_COMPOSE_HPP
8 #define PHOENIX_OPERATOR_DETAIL_BINARY_COMPOSE_HPP
9
10 #define PHOENIX_BINARY_COMPOSE(eval_name, op)                                   \
11     template <typename T0, typename T1>                                         \
12     inline actor<typename as_composite<eval_name, actor<T0>, actor<T1> >::type> \
13     operator op (actor<T0> const& a0, actor<T1> const& a1)                      \
14     {                                                                           \
15         return compose<eval_name>(a0, a1);                                      \
16     }                                                                           \
17                                                                                 \
18     template <typename T0, typename T1>                                         \
19     inline actor<typename as_composite<eval_name, actor<T0>, T1>::type>         \
20     operator op (actor<T0> const& a0, T1 const& a1)                             \
21     {                                                                           \
22         return compose<eval_name>(a0, a1);                                      \
23     }                                                                           \
24                                                                                 \
25     template <typename T0, typename T1>                                         \
26     inline actor<typename as_composite<eval_name, T0, actor<T1> >::type>        \
27     operator op (T0 const& a0, actor<T1> const& a1)                             \
28     {                                                                           \
29         return compose<eval_name>(a0, a1);                                      \
30     }
31
32 #endif