epoc32/include/stdapis/boost/preprocessor/seq/cat.hpp
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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