1 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
3 #if BOOST_WORKAROUND(__GNUC__, == 3) || (BOOST_WORKAROUND(__GNUC__, == 4) && __GNUC_MINOR__ == 0)
4 #include <boost/proto/transform/detail/preprocessed/make_gcc_workaround.hpp>
7 #elif !defined(BOOST_PP_IS_ITERATING)
9 #define BOOST_PROTO_EXPR_MAKE_ARG(Z, M, DATA) \
11 typename when<_, BOOST_PP_CAT(A, M)>::template impl<Expr, State, Data>()(e, s, d) \
15 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
16 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/make_gcc_workaround.hpp")
19 ///////////////////////////////////////////////////////////////////////////////
20 /// \file make_gcc_workaround.hpp
21 /// Special workaround code to make the make\<\> transform work on certain
24 // Copyright 2008 Eric Niebler. Distributed under the Boost
25 // Software License, Version 1.0. (See accompanying file
26 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
28 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
29 #pragma wave option(preserve: 1)
32 #if BOOST_WORKAROUND(__GNUC__, == 3) || (BOOST_WORKAROUND(__GNUC__, == 4) && __GNUC_MINOR__ == 0) || \
33 (defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES))
35 #define BOOST_PP_ITERATION_PARAMS_1 \
36 (3, (0, BOOST_PROTO_MAX_ARITY, <boost/proto/transform/detail/make_gcc_workaround.hpp>))
37 #include BOOST_PP_ITERATE()
41 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
42 #pragma wave option(output: null)
45 #undef BOOST_PROTO_EXPR_MAKE_ARG
49 #define N BOOST_PP_ITERATION()
51 // work around GCC bug
52 template<typename Tag, typename Args, long Arity BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
53 struct make<proto::expr<Tag, Args, Arity>(BOOST_PP_ENUM_PARAMS(N, A))>
54 : transform<make<proto::expr<Tag, Args, Arity>(BOOST_PP_ENUM_PARAMS(N, A))> >
56 template<typename Expr, typename State, typename Data>
57 struct impl : transform_impl<Expr, State, Data>
59 typedef proto::expr<Tag, Args, Arity> result_type;
62 result_type operator ()(
63 typename impl::expr_param e
64 , typename impl::state_param s
65 , typename impl::data_param d
68 return proto::expr<Tag, Args, Arity>::make(
69 BOOST_PP_ENUM(N, BOOST_PROTO_EXPR_MAKE_ARG, DATA)
75 template<typename Tag, typename Args, long Arity BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
76 struct make<proto::basic_expr<Tag, Args, Arity>(BOOST_PP_ENUM_PARAMS(N, A))>
77 : transform<make<proto::basic_expr<Tag, Args, Arity>(BOOST_PP_ENUM_PARAMS(N, A))> >
79 template<typename Expr, typename State, typename Data>
80 struct impl : transform_impl<Expr, State, Data>
82 typedef proto::basic_expr<Tag, Args, Arity> result_type;
85 result_type operator ()(
86 typename impl::expr_param e
87 , typename impl::state_param s
88 , typename impl::data_param d
91 return proto::basic_expr<Tag, Args, Arity>::make(
92 BOOST_PP_ENUM(N, BOOST_PROTO_EXPR_MAKE_ARG, DATA)