Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/boost/preprocessor/seq/cat.hpp @ 46

Last change on this file since 46 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.8 KB
Line 
1# /* **************************************************************************
2#  *                                                                          *
3#  *     (C) Copyright Paul Mensonides 2002.
4#  *     Distributed under the Boost Software License, Version 1.0. (See
5#  *     accompanying file LICENSE_1_0.txt or copy at
6#  *     http://www.boost.org/LICENSE_1_0.txt)
7#  *                                                                          *
8#  ************************************************************************** */
9#
10# /* See http://www.boost.org for most recent version. */
11#
12# ifndef BOOST_PREPROCESSOR_SEQ_CAT_HPP
13# define BOOST_PREPROCESSOR_SEQ_CAT_HPP
14#
15# include <boost/preprocessor/arithmetic/dec.hpp>
16# include <boost/preprocessor/config/config.hpp>
17# include <boost/preprocessor/control/if.hpp>
18# include <boost/preprocessor/seq/fold_left.hpp>
19# include <boost/preprocessor/seq/seq.hpp>
20# include <boost/preprocessor/seq/size.hpp>
21# include <boost/preprocessor/tuple/eat.hpp>
22#
23# /* BOOST_PP_SEQ_CAT */
24#
25# define BOOST_PP_SEQ_CAT(seq) \
26    BOOST_PP_IF( \
27        BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \
28        BOOST_PP_SEQ_CAT_I, \
29        BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_1 \
30    )(seq) \
31    /**/
32# 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))
33#
34# define BOOST_PP_SEQ_CAT_O(s, st, elem) BOOST_PP_SEQ_CAT_O_I(st, elem)
35# define BOOST_PP_SEQ_CAT_O_I(a, b) a ## b
36#
37# /* BOOST_PP_SEQ_CAT_S */
38#
39# define BOOST_PP_SEQ_CAT_S(s, seq) \
40    BOOST_PP_IF( \
41        BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \
42        BOOST_PP_SEQ_CAT_S_I, \
43        BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_2 \
44    )(s, seq) \
45    /**/
46# 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))
47#
48# endif
Note: See TracBrowser for help on using the repository browser.