Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:48:52

0001 # /* Copyright (C) 2001
0002 #  * Housemarque Oy
0003 #  * http://www.housemarque.com
0004 #  *
0005 #  * Distributed under the Boost Software License, Version 1.0. (See
0006 #  * accompanying file LICENSE_1_0.txt or copy at
0007 #  * http://www.boost.org/LICENSE_1_0.txt)
0008 #  */
0009 #
0010 # /* Revised by Paul Mensonides (2002) */
0011 #
0012 # /* See http://www.boost.org for most recent version. */
0013 #
0014 # ifndef BOOST_PREPROCESSOR_LIST_REVERSE_HPP
0015 # define BOOST_PREPROCESSOR_LIST_REVERSE_HPP
0016 #
0017 # include <boost/preprocessor/config/config.hpp>
0018 #
0019 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0020 #
0021 # include <boost/preprocessor/list/fold_left.hpp>
0022 #
0023 # /* BOOST_PP_LIST_REVERSE */
0024 #
0025 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0026 #    define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list)
0027 # else
0028 #    define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_REVERSE_I(list)
0029 #    define BOOST_PP_LIST_REVERSE_I(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list)
0030 # endif
0031 #
0032 # define BOOST_PP_LIST_REVERSE_O(d, s, x) (x, s)
0033 #
0034 # /* BOOST_PP_LIST_REVERSE_D */
0035 #
0036 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0037 #    define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list)
0038 # else
0039 #    define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_REVERSE_D_I(d, list)
0040 #    define BOOST_PP_LIST_REVERSE_D_I(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list)
0041 # endif
0042 #
0043 # else
0044 #
0045 # include <boost/preprocessor/control/iif.hpp>
0046 # include <boost/preprocessor/facilities/identity.hpp>
0047 # include <boost/preprocessor/list/adt.hpp>
0048 # include <boost/preprocessor/list/fold_left.hpp>
0049 #
0050 # /* BOOST_PP_LIST_REVERSE */
0051 #
0052 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0053 #    define BOOST_PP_LIST_REVERSE(list) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(list),BOOST_PP_LIST_REVERSE_CONS,BOOST_PP_IDENTITY_N(BOOST_PP_NIL,1))(list)
0054 # else
0055 #    define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_REVERSE_I(list)
0056 #    define BOOST_PP_LIST_REVERSE_I(list) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(list),BOOST_PP_LIST_REVERSE_CONS,BOOST_PP_IDENTITY_N(BOOST_PP_NIL,1))(list)
0057 # endif
0058 #
0059 # define BOOST_PP_LIST_REVERSE_O(d, s, x) (x, s)
0060 #
0061 # /* BOOST_PP_LIST_REVERSE_D */
0062 #
0063 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0064 #    define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(list),BOOST_PP_LIST_REVERSE_CONS_D,BOOST_PP_IDENTITY_N(BOOST_PP_NIL,2))(d,list)
0065 # else
0066 #    define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_REVERSE_D_I(d, list)
0067 #    define BOOST_PP_LIST_REVERSE_D_I(d, list) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(list),BOOST_PP_LIST_REVERSE_CONS_D,BOOST_PP_IDENTITY_N(BOOST_PP_NIL,2))(d,list)
0068 # endif
0069 #
0070 # define BOOST_PP_LIST_REVERSE_CONS(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, (BOOST_PP_LIST_FIRST(list),BOOST_PP_NIL), BOOST_PP_LIST_REST(list))
0071 # define BOOST_PP_LIST_REVERSE_CONS_D(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, (BOOST_PP_LIST_FIRST(list),BOOST_PP_NIL), BOOST_PP_LIST_REST(list))
0072 #
0073 # endif
0074 #
0075 # endif