File indexing completed on 2025-01-18 09:50:31
0001 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
0002
0003 #include <boost/proto/transform/detail/preprocessed/pass_through_impl.hpp>
0004
0005 #elif !defined(BOOST_PP_IS_ITERATING)
0006
0007 #define BOOST_PROTO_DEFINE_TRANSFORM_TYPE(Z, N, DATA) \
0008 typename Grammar::BOOST_PP_CAT(proto_child, N)::template impl< \
0009 typename result_of::child_c<Expr, N>::type \
0010 , State \
0011 , Data \
0012 >::result_type \
0013
0014
0015 #define BOOST_PROTO_DEFINE_TRANSFORM(Z, N, DATA) \
0016 typename Grammar::BOOST_PP_CAT(proto_child, N)::template impl< \
0017 typename result_of::child_c<Expr, N>::type \
0018 , State \
0019 , Data \
0020 >()( \
0021 e.proto_base().BOOST_PP_CAT(child, N), s, d \
0022 ) \
0023
0024
0025 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0026 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/pass_through_impl.hpp")
0027 #endif
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0040 #pragma wave option(preserve: 1)
0041 #endif
0042
0043 #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/transform/detail/pass_through_impl.hpp>))
0044 #include BOOST_PP_ITERATE()
0045
0046 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0047 #pragma wave option(output: null)
0048 #endif
0049
0050 #undef BOOST_PROTO_DEFINE_TRANSFORM
0051 #undef BOOST_PROTO_DEFINE_TRANSFORM_TYPE
0052
0053 #else
0054
0055 #define N BOOST_PP_ITERATION()
0056
0057 template<typename Grammar, typename Domain, typename Expr, typename State, typename Data>
0058 struct pass_through_impl<Grammar, Domain, Expr, State, Data, N>
0059 : transform_impl<Expr, State, Data>
0060 {
0061 typedef typename pass_through_impl::expr unref_expr;
0062 typedef
0063 typename mpl::if_c<
0064 is_same<Domain, deduce_domain>::value
0065 , typename unref_expr::proto_domain
0066 , Domain
0067 >::type
0068 result_domain;
0069
0070 typedef
0071 typename base_expr<
0072 result_domain
0073 , typename unref_expr::proto_tag
0074 , BOOST_PP_CAT(list, N)<
0075 BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_TRANSFORM_TYPE, ~)
0076 >
0077 >::type
0078 expr_type;
0079
0080 typedef typename result_domain::proto_generator proto_generator;
0081 typedef typename BOOST_PROTO_RESULT_OF<proto_generator(expr_type)>::type result_type;
0082
0083 BOOST_FORCEINLINE
0084 BOOST_PROTO_RETURN_TYPE_STRICT_LOOSE(result_type, result_type const)
0085 operator ()(
0086 typename pass_through_impl::expr_param e
0087 , typename pass_through_impl::state_param s
0088 , typename pass_through_impl::data_param d
0089 ) const
0090 {
0091 expr_type const that = {
0092 BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_TRANSFORM, ~)
0093 };
0094
0095
0096
0097 detail::ignore_unused(&that);
0098 return proto_generator()(that);
0099 }
0100 };
0101
0102 #undef N
0103
0104 #endif