]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES) |
2 | ||
3 | #include <boost/proto/detail/preprocessed/vararg_matches_impl.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/vararg_matches_impl.hpp") | |
9 | #endif | |
10 | ||
11 | /////////////////////////////////////////////////////////////////////////////// | |
12 | /// \file vararg_matches_impl.hpp | |
13 | /// Specializations of the vararg_matches_impl template | |
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/vararg_matches_impl.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 | template<typename Args, typename Back, long To> | |
36 | struct vararg_matches_impl<Args, Back, N, To> | |
37 | : and_2< | |
38 | matches_< | |
39 | typename detail::expr_traits<typename Args::BOOST_PP_CAT(child, BOOST_PP_DEC(N))>::value_type::proto_derived_expr | |
40 | , typename detail::expr_traits<typename Args::BOOST_PP_CAT(child, BOOST_PP_DEC(N))>::value_type::proto_grammar | |
41 | , Back | |
42 | >::value | |
43 | , vararg_matches_impl<Args, Back, N + 1, To> | |
44 | > | |
45 | {}; | |
46 | ||
47 | template<typename Args, typename Back> | |
48 | struct vararg_matches_impl<Args, Back, N, N> | |
49 | : matches_< | |
50 | typename detail::expr_traits<typename Args::BOOST_PP_CAT(child, BOOST_PP_DEC(N))>::value_type::proto_derived_expr | |
51 | , typename detail::expr_traits<typename Args::BOOST_PP_CAT(child, BOOST_PP_DEC(N))>::value_type::proto_grammar | |
52 | , Back | |
53 | > | |
54 | {}; | |
55 | ||
56 | #undef N | |
57 | ||
58 | #endif |