File indexing completed on 2025-01-18 09:50:26
0001 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
0002
0003 #include <boost/proto/detail/preprocessed/funop.hpp>
0004
0005 #elif !defined(BOOST_PP_IS_ITERATING)
0006
0007 #define BOOST_PROTO_AS_CHILD_TYPE(Z, N, DATA) \
0008 typename proto::result_of::as_child<BOOST_PP_CAT(A, N), Domain>::type \
0009
0010
0011 #define BOOST_PROTO_AS_CHILD(Z, N, DATA) \
0012 proto::as_child<Domain>(BOOST_PP_CAT(a, N)) \
0013
0014
0015 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0016 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/funop.hpp")
0017 #endif
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0028 #pragma wave option(preserve: 1)
0029 #endif
0030
0031 #define BOOST_PP_ITERATION_PARAMS_1 \
0032 (3, (0, BOOST_PP_DEC(BOOST_PROTO_MAX_FUNCTION_CALL_ARITY), <boost/proto/detail/funop.hpp>))
0033 #include BOOST_PP_ITERATE()
0034
0035 #undef BOOST_PROTO_AS_CHILD
0036 #undef BOOST_PROTO_AS_CHILD_TYPE
0037
0038 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0039 #pragma wave option(output: null)
0040 #endif
0041
0042 #else
0043
0044
0045
0046 template<typename Expr, typename Domain BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename A)>
0047 struct BOOST_PP_CAT(funop, BOOST_PP_ITERATION())
0048 {
0049 typedef typename proto::base_expr<
0050 Domain
0051 , tag::function
0052 , BOOST_PP_CAT(list, BOOST_PP_INC(BOOST_PP_ITERATION()))<
0053 Expr &
0054 BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), BOOST_PROTO_AS_CHILD_TYPE, ~)
0055 >
0056 >::type type;
0057
0058 BOOST_FORCEINLINE
0059 static type const call(
0060 Expr &e
0061 BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(BOOST_PP_ITERATION(), A, &a)
0062 )
0063 {
0064 type that = {
0065 e
0066 BOOST_PP_ENUM_TRAILING(BOOST_PP_ITERATION(), BOOST_PROTO_AS_CHILD, ~)
0067 };
0068 return that;
0069 }
0070 };
0071
0072
0073
0074 template<typename Expr BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename A), typename This, typename Domain>
0075 struct funop<Expr(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), This, Domain>
0076 : BOOST_PP_CAT(funop, BOOST_PP_ITERATION())<
0077 typename detail::same_cv<Expr, This>::type
0078 , Domain
0079 BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(
0080 BOOST_PP_ITERATION()
0081 , typename remove_reference<A
0082 , >::type BOOST_PP_INTERCEPT
0083 )
0084 >
0085 {};
0086
0087 #endif