1 ///////////////////////////////////////////////////////////////////////////////
2 // expr1.hpp
3 // Contains definition of expr\<\>::operator() overloads.
4 //
5 //  Copyright 2008 Eric Niebler. Distributed under the Boost
6 //  Software License, Version 1.0. (See accompanying file
7 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 
9 #define N BOOST_PP_ITERATION()
10 
11         /// \overload
12         ///
13         template<BOOST_PP_ENUM_PARAMS(N, typename A)>
14         BOOST_FORCEINLINE
BOOST_PP_CAT(funop,N)15         typename result_of::BOOST_PP_CAT(funop, N)<
16             expr const
17           , default_domain BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
18         >::type const
19         operator ()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const &a)) const
20         {
21             return result_of::BOOST_PP_CAT(funop, N)<
22                 expr const
23               , default_domain BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
24             >::call(*this BOOST_PP_ENUM_TRAILING_PARAMS(N, a));
25         }
26 
27         #ifdef BOOST_PROTO_DEFINE_TERMINAL
28         /// \overload
29         ///
30         template<BOOST_PP_ENUM_PARAMS(N, typename A)>
31         BOOST_FORCEINLINE
BOOST_PP_CAT(funop,N)32         typename result_of::BOOST_PP_CAT(funop, N)<
33             expr
34           , default_domain BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
35         >::type const
36         operator ()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const &a))
37         {
38             return result_of::BOOST_PP_CAT(funop, N)<
39                 expr
40               , default_domain BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
41             >::call(*this BOOST_PP_ENUM_TRAILING_PARAMS(N, a));
42         }
43         #endif
44 
45 #undef N
46