summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-01 08:48:42 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-01 09:24:28 (GMT)
commit2812bddd81f8a1b804c7460f4e14cd0aa393d129 (patch)
treed46294f35150c4f0f43deaf2d31fceaf945ae715 /3rdParty/Boost/boost/typeof/encode_decode_params.hpp
downloadswift-2812bddd81f8a1b804c7460f4e14cd0aa393d129.zip
swift-2812bddd81f8a1b804c7460f4e14cd0aa393d129.tar.bz2
Import.
Diffstat (limited to '3rdParty/Boost/boost/typeof/encode_decode_params.hpp')
-rw-r--r--3rdParty/Boost/boost/typeof/encode_decode_params.hpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/3rdParty/Boost/boost/typeof/encode_decode_params.hpp b/3rdParty/Boost/boost/typeof/encode_decode_params.hpp
new file mode 100644
index 0000000..640bfdc
--- /dev/null
+++ b/3rdParty/Boost/boost/typeof/encode_decode_params.hpp
@@ -0,0 +1,34 @@
+// Copyright (C) 2005 Arkadiy Vertleyb
+// 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 BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
+#define BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+// Assumes iter0 contains initial iterator
+
+#define BOOST_TYPEOF_DECODE_PARAM(z, n, text) \
+ typedef boost::type_of::decode_type<iter##n> decode##n; \
+ typedef typename decode##n::type p##n; \
+ typedef typename decode##n::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));
+
+#define BOOST_TYPEOF_DECODE_PARAMS(n)\
+ BOOST_PP_REPEAT(n, BOOST_TYPEOF_DECODE_PARAM, ~)
+
+// The P0, P1, ... PN are encoded and added to V
+
+#define BOOST_TYPEOF_ENCODE_PARAMS_BEGIN(z, n, text)\
+ typename boost::type_of::encode_type<
+
+#define BOOST_TYPEOF_ENCODE_PARAMS_END(z, n, text)\
+ , BOOST_PP_CAT(P, n)>::type
+
+#define BOOST_TYPEOF_ENCODE_PARAMS(n, ID) \
+ BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_BEGIN, ~) \
+ typename boost::type_of::push_back<V, boost::mpl::size_t<ID> >::type \
+ BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_END, ~)
+
+#endif//BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED