diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-01-12 18:41:34 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-01-13 10:36:26 (GMT) |
commit | f3bc816af1b0d61452de973963e453bf3b3f95a2 (patch) | |
tree | e895f8afa3580e6cff6f5ad2017d45bf147a17c2 /3rdParty/Boost/src/boost/phoenix/scope/detail/local_gen.hpp | |
parent | 188fc285c6555eadd3c9d50ab8a94adcade78d89 (diff) | |
download | swift-f3bc816af1b0d61452de973963e453bf3b3f95a2.zip swift-f3bc816af1b0d61452de973963e453bf3b3f95a2.tar.bz2 |
Adding in the spirit Boost stuff
Change-Id: I4f127ce61667243b64081b0aa309028d5077045f
Diffstat (limited to '3rdParty/Boost/src/boost/phoenix/scope/detail/local_gen.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/phoenix/scope/detail/local_gen.hpp | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/phoenix/scope/detail/local_gen.hpp b/3rdParty/Boost/src/boost/phoenix/scope/detail/local_gen.hpp new file mode 100644 index 0000000..e422332 --- /dev/null +++ b/3rdParty/Boost/src/boost/phoenix/scope/detail/local_gen.hpp @@ -0,0 +1,66 @@ +#if !BOOST_PHOENIX_IS_ITERATING +/*============================================================================== + Copyright (c) 2005-2010 Joel de Guzman + Copyright (c) 2010 Thomas Heller + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include <boost/phoenix/support/iterate.hpp> + +#define BOOST_PHOENIX_EXTRACT_LOCAL_TYPE(Z, N, D) \ + typename proto::detail::uncvref< \ + typename proto::result_of::child_c< \ + BOOST_PP_CAT(A, N) \ + , 1 \ + >::type \ + >::type +/**/ + +#define BOOST_PHOENIX_EXTRACT_LOCAL(Z, N, D) \ + proto::child_c<1>(BOOST_PP_CAT(a, N)) \ +/**/ + +#define BOOST_PHOENIX_EXTRACT_LOCAL_KEY(Z, N, D) \ + typename proto::detail::uncvref< \ + typename proto::result_of::value< \ + typename proto::result_of::child_c< \ + BOOST_PP_CAT(A, N) \ + , 0 \ + >::type \ + >::type \ + >::type +/**/ + +#define BOOST_PHOENIX_ITERATION_PARAMS \ + (3, (1, BOOST_PHOENIX_LOCAL_LIMIT, \ + <boost/phoenix/scope/detail/local_gen.hpp>)) +#include BOOST_PHOENIX_ITERATE() + +#else + + template <BOOST_PHOENIX_typename_A> + BOOST_PHOENIX_SCOPE_ACTOR_GEN_NAME< + BOOST_PP_CAT(vector, BOOST_PHOENIX_ITERATION)<BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_EXTRACT_LOCAL_TYPE, _)> + , detail::map_local_index_to_tuple<BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_EXTRACT_LOCAL_KEY, _)> + > + BOOST_PHOENIX_SCOPE_ACTOR_GEN_FUNCTION (BOOST_PHOENIX_A_const_ref_a) BOOST_PHOENIX_SCOPE_ACTOR_GEN_CONST + { + typedef + BOOST_PP_CAT(vector, BOOST_PHOENIX_ITERATION)<BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_EXTRACT_LOCAL_TYPE, _)> + locals_type; + + locals_type locals = {BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_EXTRACT_LOCAL, _)}; + + return + BOOST_PHOENIX_SCOPE_ACTOR_GEN_NAME< + locals_type + , detail::map_local_index_to_tuple< + BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_EXTRACT_LOCAL_KEY, _) + > + >(locals); + } + +#endif + |