Chris@16: #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES) Chris@16: Chris@16: #include Chris@16: Chris@16: #elif !defined(BOOST_PP_IS_ITERATING) Chris@16: Chris@16: #define BOOST_PROTO_AS_CHILD_TYPE(Z, N, DATA) \ Chris@16: typename proto::result_of::as_child::type \ Chris@16: /**/ Chris@16: Chris@16: #define BOOST_PROTO_AS_CHILD(Z, N, DATA) \ Chris@16: proto::as_child(BOOST_PP_CAT(a, N)) \ Chris@16: /**/ Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(preserve: 2, line: 0, output: "preprocessed/funop.hpp") Chris@16: #endif Chris@16: Chris@16: /////////////////////////////////////////////////////////////////////////////// Chris@16: // funop.hpp Chris@16: // Contains definition of funop[n]\<\> class template. Chris@16: // Chris@16: // Copyright 2008 Eric Niebler. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(preserve: 1) Chris@16: #endif Chris@16: Chris@16: #define BOOST_PP_ITERATION_PARAMS_1 \ Chris@16: (3, (0, BOOST_PP_DEC(BOOST_PROTO_MAX_FUNCTION_CALL_ARITY), )) Chris@16: #include BOOST_PP_ITERATE() Chris@16: Chris@16: #undef BOOST_PROTO_AS_CHILD Chris@16: #undef BOOST_PROTO_AS_CHILD_TYPE Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(output: null) Chris@16: #endif Chris@16: Chris@16: #else Chris@16: Chris@16: /// \brief A helper metafunction for computing the Chris@16: /// return type of \c proto::expr\<\>::operator(). Chris@16: template Chris@16: struct BOOST_PP_CAT(funop, BOOST_PP_ITERATION()) Chris@16: { Chris@16: typedef typename proto::base_expr< Chris@16: Domain Chris@16: , tag::function Chris@16: , BOOST_PP_CAT(list, BOOST_PP_INC(BOOST_PP_ITERATION()))< Chris@16: Expr & Chris@16: BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), BOOST_PROTO_AS_CHILD_TYPE, ~) Chris@16: > Chris@16: >::type type; Chris@16: Chris@16: BOOST_FORCEINLINE Chris@16: static type const call( Chris@16: Expr &e Chris@16: BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(BOOST_PP_ITERATION(), A, &a) Chris@16: ) Chris@16: { Chris@16: type that = { Chris@16: e Chris@16: BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), BOOST_PROTO_AS_CHILD, ~) Chris@16: }; Chris@16: return that; Chris@16: } Chris@16: }; Chris@16: Chris@16: /// \brief A helper metafunction for computing the Chris@16: /// return type of \c proto::expr\<\>::operator(). Chris@16: template Chris@16: struct funop Chris@16: : BOOST_PP_CAT(funop, BOOST_PP_ITERATION())< Chris@16: typename detail::same_cv::type Chris@16: , Domain Chris@16: BOOST_PP_ENUM_TRAILING_BINARY_PARAMS( Chris@16: BOOST_PP_ITERATION() Chris@16: , typename remove_reference::type BOOST_PP_INTERCEPT Chris@16: ) Chris@16: > Chris@16: {}; Chris@16: Chris@16: #endif // BOOST_PROTO_DONT_USE_PREPROCESSED_FILES