]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #if !BOOST_PHOENIX_IS_ITERATING |
2 | /*============================================================================== | |
3 | Copyright (c) 2005-2010 Joel de Guzman | |
4 | Copyright (c) 2010 Thomas Heller | |
5 | ||
6 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
7 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
8 | ==============================================================================*/ | |
9 | ||
10 | #include <boost/phoenix/support/iterate.hpp> | |
11 | ||
12 | #define BOOST_PHOENIX_EXTRACT_LOCAL_TYPE(Z, N, D) \ | |
13 | typename proto::detail::uncvref< \ | |
14 | typename proto::result_of::child_c< \ | |
15 | BOOST_PP_CAT(A, N) \ | |
16 | , 1 \ | |
17 | >::type \ | |
18 | >::type | |
19 | /**/ | |
20 | ||
21 | #define BOOST_PHOENIX_EXTRACT_LOCAL(Z, N, D) \ | |
22 | proto::child_c<1>(BOOST_PP_CAT(a, N)) \ | |
23 | /**/ | |
24 | ||
25 | #define BOOST_PHOENIX_EXTRACT_LOCAL_KEY(Z, N, D) \ | |
26 | typename proto::detail::uncvref< \ | |
27 | typename proto::result_of::value< \ | |
28 | typename proto::result_of::child_c< \ | |
29 | BOOST_PP_CAT(A, N) \ | |
30 | , 0 \ | |
31 | >::type \ | |
32 | >::type \ | |
33 | >::type | |
34 | /**/ | |
35 | ||
36 | #define BOOST_PHOENIX_ITERATION_PARAMS \ | |
37 | (3, (1, BOOST_PHOENIX_LOCAL_LIMIT, \ | |
38 | <boost/phoenix/scope/detail/cpp03/local_gen.hpp>)) | |
39 | #include BOOST_PHOENIX_ITERATE() | |
40 | ||
41 | #else | |
42 | ||
43 | template <BOOST_PHOENIX_typename_A> | |
44 | BOOST_PHOENIX_SCOPE_ACTOR_GEN_NAME< | |
45 | BOOST_PP_CAT(vector, BOOST_PHOENIX_ITERATION)<BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_EXTRACT_LOCAL_TYPE, _)> | |
46 | , detail::map_local_index_to_tuple<BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_EXTRACT_LOCAL_KEY, _)> | |
47 | > | |
48 | BOOST_PHOENIX_SCOPE_ACTOR_GEN_FUNCTION (BOOST_PHOENIX_A_const_ref_a) BOOST_PHOENIX_SCOPE_ACTOR_GEN_CONST | |
49 | { | |
50 | typedef | |
51 | BOOST_PP_CAT(vector, BOOST_PHOENIX_ITERATION)<BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_EXTRACT_LOCAL_TYPE, _)> | |
52 | locals_type; | |
53 | ||
54 | locals_type locals = {BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_EXTRACT_LOCAL, _)}; | |
55 | ||
56 | return | |
57 | BOOST_PHOENIX_SCOPE_ACTOR_GEN_NAME< | |
58 | locals_type | |
59 | , detail::map_local_index_to_tuple< | |
60 | BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_EXTRACT_LOCAL_KEY, _) | |
61 | > | |
62 | >(locals); | |
63 | } | |
64 | ||
65 | #endif | |
66 |