X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=boost_ext%2Fboost%2Ftypeof%2Fencode_decode_params.hpp;fp=boost_ext%2Fboost%2Ftypeof%2Fencode_decode_params.hpp;h=640bfdc2a65a26316e9d3377385a6a66fe192fdd;hb=4123b4fe58a7fd4659fa01476581690b47c83600;hp=0000000000000000000000000000000000000000;hpb=79564b90f6c9f7cd0bc5b11a6146bb7067b11a75;p=senf.git diff --git a/boost_ext/boost/typeof/encode_decode_params.hpp b/boost_ext/boost/typeof/encode_decode_params.hpp new file mode 100644 index 0000000..640bfdc --- /dev/null +++ b/boost_ext/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 +#include + +// Assumes iter0 contains initial iterator + +#define BOOST_TYPEOF_DECODE_PARAM(z, n, text) \ + typedef boost::type_of::decode_type 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 >::type \ + BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_END, ~) + +#endif//BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED