1 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
3 #include <boost/proto/transform/detail/preprocessed/pass_through_impl.hpp>
5 #elif !defined(BOOST_PP_IS_ITERATING)
7 #define BOOST_PROTO_DEFINE_TRANSFORM_TYPE(Z, N, DATA) \
8 typename Grammar::BOOST_PP_CAT(proto_child, N)::template impl< \
9 typename result_of::child_c<Expr, N>::type \
15 #define BOOST_PROTO_DEFINE_TRANSFORM(Z, N, DATA) \
16 typename Grammar::BOOST_PP_CAT(proto_child, N)::template impl< \
17 typename result_of::child_c<Expr, N>::type \
21 e.proto_base().BOOST_PP_CAT(child, N), s, d \
25 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
26 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/pass_through_impl.hpp")
29 ///////////////////////////////////////////////////////////////////////////////
30 /// \file pass_through_impl.hpp
32 /// Specializations of pass_through_impl, used in the implementation of the
33 /// pass_through transform.
35 // Copyright 2008 Eric Niebler. Distributed under the Boost
36 // Software License, Version 1.0. (See accompanying file
37 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
39 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
40 #pragma wave option(preserve: 1)
43 #define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/transform/detail/pass_through_impl.hpp>))
44 #include BOOST_PP_ITERATE()
46 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
47 #pragma wave option(output: null)
50 #undef BOOST_PROTO_DEFINE_TRANSFORM
51 #undef BOOST_PROTO_DEFINE_TRANSFORM_TYPE
55 #define N BOOST_PP_ITERATION()
57 template<typename Grammar, typename Domain, typename Expr, typename State, typename Data>
58 struct pass_through_impl<Grammar, Domain, Expr, State, Data, N>
59 : transform_impl<Expr, State, Data>
61 typedef typename pass_through_impl::expr unref_expr;
64 is_same<Domain, deduce_domain>::value
65 , typename unref_expr::proto_domain
73 , typename unref_expr::proto_tag
74 , BOOST_PP_CAT(list, N)<
75 BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_TRANSFORM_TYPE, ~)
80 typedef typename result_domain::proto_generator proto_generator;
81 typedef typename BOOST_PROTO_RESULT_OF<proto_generator(expr_type)>::type result_type;
84 BOOST_PROTO_RETURN_TYPE_STRICT_LOOSE(result_type, result_type const)
86 typename pass_through_impl::expr_param e
87 , typename pass_through_impl::state_param s
88 , typename pass_through_impl::data_param d
91 expr_type const that = {
92 BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_TRANSFORM, ~)
94 // Without this, MSVC complains that "that" is uninitialized,
95 // and it actually triggers a runtime check in debug mode when
97 detail::ignore_unused(&that);
98 return proto_generator()(that);