Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68751 - sandbox/SOC/2010/phoenix3/boost/phoenix/support
From: thom.heller_at_[hidden]
Date: 2011-02-09 16:14:43


Author: theller
Date: 2011-02-09 16:14:41 EST (Wed, 09 Feb 2011)
New Revision: 68751
URL: http://svn.boost.org/trac/boost/changeset/68751

Log:
forgot vector
Added:
   sandbox/SOC/2010/phoenix3/boost/phoenix/support/vector.hpp (contents, props changed)

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/support/vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/support/vector.hpp 2011-02-09 16:14:41 EST (Wed, 09 Feb 2011)
@@ -0,0 +1,57 @@
+
+#if !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)
+==============================================================================*/
+#ifndef PHOENIX_SUPPORT_VECTOR_HPP
+#define PHOENIX_SUPPORT_VECTOR_HPP
+
+#include <boost/phoenix/core/limits.hpp>
+#include <boost/phoenix/support/iterate.hpp>
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
+
+#define M0(Z, N, D) \
+ typedef BOOST_PP_CAT(A, N) BOOST_PP_CAT(member_type, N); \
+ BOOST_PP_CAT(A, N) BOOST_PP_CAT(a, N); \
+/**/
+#define M1(Z, N, D) \
+ (BOOST_PP_CAT(A, N)) \
+/**/
+#define M2(Z, N, D) \
+ (BOOST_PP_CAT(A, N), BOOST_PP_CAT(a, N)) \
+/**/
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (1, BOOST_PP_INC(PHOENIX_LIMIT), \
+ <boost/phoenix/support/vector.hpp>))
+#include PHOENIX_ITERATE()
+
+#undef M0
+#undef M1
+#undef M2
+
+#endif
+
+#else
+
+namespace boost { namespace phoenix
+{
+ template <PHOENIX_typename_A>
+ struct BOOST_PP_CAT(vector, PHOENIX_ITERATION)
+ {
+ BOOST_PP_REPEAT(PHOENIX_ITERATION, M0, _)
+ };
+}}
+
+BOOST_FUSION_ADAPT_TPL_STRUCT(
+ BOOST_PP_REPEAT(PHOENIX_ITERATION, M1, _)
+ , (BOOST_PP_CAT(boost::phoenix::vector, PHOENIX_ITERATION))BOOST_PP_REPEAT(PHOENIX_ITERATION, M1, _)
+ , BOOST_PP_REPEAT(PHOENIX_ITERATION, M2, _)
+)
+
+#endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk