| 1 | #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES) |
| 2 | |
| 3 | #include <boost/proto/detail/preprocessed/make_expr.hpp> |
| 4 | |
| 5 | #elif !defined(BOOST_PP_IS_ITERATING) |
| 6 | |
| 7 | #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) |
| 8 | #pragma wave option(preserve: 2, line: 0, output: "preprocessed/make_expr.hpp") |
| 9 | #endif |
| 10 | |
| 11 | /////////////////////////////////////////////////////////////////////////////// |
| 12 | /// \file make_expr.hpp |
| 13 | /// Contains overloads of make_expr() free function. |
| 14 | // |
| 15 | // Copyright 2008 Eric Niebler. Distributed under the Boost |
| 16 | // Software License, Version 1.0. (See accompanying file |
| 17 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 18 | |
| 19 | #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) |
| 20 | #pragma wave option(preserve: 1) |
| 21 | #endif |
| 22 | |
| 23 | #define BOOST_PP_ITERATION_PARAMS_1 \ |
| 24 | (3, (2, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/make_expr.hpp>)) |
| 25 | #include BOOST_PP_ITERATE() |
| 26 | |
| 27 | #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) |
| 28 | #pragma wave option(output: null) |
| 29 | #endif |
| 30 | |
| 31 | #else // BOOST_PP_IS_ITERATING |
| 32 | |
| 33 | #define N BOOST_PP_ITERATION() |
| 34 | |
| 35 | /// \overload |
| 36 | /// |
| 37 | template<typename Tag BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)> |
| 38 | BOOST_FORCEINLINE |
| 39 | typename lazy_disable_if< |
| 40 | is_domain<A0> |
| 41 | , result_of::make_expr< |
| 42 | Tag |
| 43 | BOOST_PP_ENUM_TRAILING_PARAMS(N, const A) |
| 44 | > |
| 45 | >::type const |
| 46 | make_expr(BOOST_PP_ENUM_BINARY_PARAMS(N, const A, &a)) |
| 47 | { |
| 48 | return proto::detail::make_expr_< |
| 49 | Tag |
| 50 | , deduce_domain |
| 51 | BOOST_PP_ENUM_TRAILING_PARAMS(N, const A) |
| 52 | >()(BOOST_PP_ENUM_PARAMS(N, a)); |
| 53 | } |
| 54 | |
| 55 | /// \overload |
| 56 | /// |
| 57 | template<typename Tag, typename Domain BOOST_PP_ENUM_TRAILING_PARAMS(N, typename C)> |
| 58 | BOOST_FORCEINLINE |
| 59 | typename result_of::make_expr< |
| 60 | Tag |
| 61 | , Domain |
| 62 | BOOST_PP_ENUM_TRAILING_PARAMS(N, const C) |
| 63 | >::type const |
| 64 | make_expr(BOOST_PP_ENUM_BINARY_PARAMS(N, const C, &c)) |
| 65 | { |
| 66 | return proto::detail::make_expr_< |
| 67 | Tag |
| 68 | , Domain |
| 69 | BOOST_PP_ENUM_TRAILING_PARAMS(N, const C) |
| 70 | >()(BOOST_PP_ENUM_PARAMS(N, c)); |
| 71 | } |
| 72 | |
| 73 | #undef N |
| 74 | |
| 75 | #endif |
| 76 | |