1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/preprocessor/cat.hpp Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,48 @@
1.4 +# /* **************************************************************************
1.5 +# * *
1.6 +# * (C) Copyright Paul Mensonides 2002.
1.7 +# * Distributed under the Boost Software License, Version 1.0. (See
1.8 +# * accompanying file LICENSE_1_0.txt or copy at
1.9 +# * http://www.boost.org/LICENSE_1_0.txt)
1.10 +# * *
1.11 +# ************************************************************************** */
1.12 +#
1.13 +# /* See http://www.boost.org for most recent version. */
1.14 +#
1.15 +# ifndef BOOST_PREPROCESSOR_SEQ_CAT_HPP
1.16 +# define BOOST_PREPROCESSOR_SEQ_CAT_HPP
1.17 +#
1.18 +# include <boost/preprocessor/arithmetic/dec.hpp>
1.19 +# include <boost/preprocessor/config/config.hpp>
1.20 +# include <boost/preprocessor/control/if.hpp>
1.21 +# include <boost/preprocessor/seq/fold_left.hpp>
1.22 +# include <boost/preprocessor/seq/seq.hpp>
1.23 +# include <boost/preprocessor/seq/size.hpp>
1.24 +# include <boost/preprocessor/tuple/eat.hpp>
1.25 +#
1.26 +# /* BOOST_PP_SEQ_CAT */
1.27 +#
1.28 +# define BOOST_PP_SEQ_CAT(seq) \
1.29 + BOOST_PP_IF( \
1.30 + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \
1.31 + BOOST_PP_SEQ_CAT_I, \
1.32 + BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_1 \
1.33 + )(seq) \
1.34 + /**/
1.35 +# define BOOST_PP_SEQ_CAT_I(seq) BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq))
1.36 +#
1.37 +# define BOOST_PP_SEQ_CAT_O(s, st, elem) BOOST_PP_SEQ_CAT_O_I(st, elem)
1.38 +# define BOOST_PP_SEQ_CAT_O_I(a, b) a ## b
1.39 +#
1.40 +# /* BOOST_PP_SEQ_CAT_S */
1.41 +#
1.42 +# define BOOST_PP_SEQ_CAT_S(s, seq) \
1.43 + BOOST_PP_IF( \
1.44 + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \
1.45 + BOOST_PP_SEQ_CAT_S_I, \
1.46 + BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_2 \
1.47 + )(s, seq) \
1.48 + /**/
1.49 +# define BOOST_PP_SEQ_CAT_S_I(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq))
1.50 +#
1.51 +# endif