1 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
3 #include <boost/proto/detail/preprocessed/funop.hpp>
5 #elif !defined(BOOST_PP_IS_ITERATING)
7 #define BOOST_PROTO_AS_CHILD_TYPE(Z, N, DATA) \
8 typename proto::result_of::as_child<BOOST_PP_CAT(A, N), Domain>::type \
11 #define BOOST_PROTO_AS_CHILD(Z, N, DATA) \
12 proto::as_child<Domain>(BOOST_PP_CAT(a, N)) \
15 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
16 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/funop.hpp")
19 ///////////////////////////////////////////////////////////////////////////////
21 // Contains definition of funop[n]\<\> class template.
23 // Copyright 2008 Eric Niebler. Distributed under the Boost
24 // Software License, Version 1.0. (See accompanying file
25 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
27 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
28 #pragma wave option(preserve: 1)
31 #define BOOST_PP_ITERATION_PARAMS_1 \
32 (3, (0, BOOST_PP_DEC(BOOST_PROTO_MAX_FUNCTION_CALL_ARITY), <boost/proto/detail/funop.hpp>))
33 #include BOOST_PP_ITERATE()
35 #undef BOOST_PROTO_AS_CHILD
36 #undef BOOST_PROTO_AS_CHILD_TYPE
38 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
39 #pragma wave option(output: null)
44 /// \brief A helper metafunction for computing the
45 /// return type of \c proto::expr\<\>::operator().
46 template<typename Expr, typename Domain BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename A)>
47 struct BOOST_PP_CAT(funop, BOOST_PP_ITERATION())
49 typedef typename proto::base_expr<
52 , BOOST_PP_CAT(list, BOOST_PP_INC(BOOST_PP_ITERATION()))<
54 BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), BOOST_PROTO_AS_CHILD_TYPE, ~)
59 static type const call(
61 BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(BOOST_PP_ITERATION(), A, &a)
66 BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), BOOST_PROTO_AS_CHILD, ~)
72 /// \brief A helper metafunction for computing the
73 /// return type of \c proto::expr\<\>::operator().
74 template<typename Expr BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename A), typename This, typename Domain>
75 struct funop<Expr(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), This, Domain>
76 : BOOST_PP_CAT(funop, BOOST_PP_ITERATION())<
77 typename detail::same_cv<Expr, This>::type
79 BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(
81 , typename remove_reference<A
82 , >::type BOOST_PP_INTERCEPT
87 #endif // BOOST_PROTO_DONT_USE_PREPROCESSED_FILES