Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/preprocessor/list/reverse.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 ">#
0011 # /* Revised by Paul Mensonides (2002) */
0012 0013 ">#
0014 # /* See http://www.boost.org for most recent version. */
0015 0016 ">#
0017 # ifndef BOOST_PREPROCESSOR_LIST_REVERSE_HPP
0018 # define BOOST_PREPROCESSOR_LIST_REVERSE_HPP
0019 0020 ">#
0021 # include <boost/preprocessor/config/config.hpp>
0022 0023 ">#
0024 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0025 0026 ">#
0027 # include <boost/preprocessor/list/fold_left.hpp>
0028 0029 ">#
0030 # /* BOOST_PP_LIST_REVERSE */
0031 0032 ">#
0033 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0034 #    define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list)
0035 # else
0036 #    define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_REVERSE_I(list)
0037 #    define BOOST_PP_LIST_REVERSE_I(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list)
0038 # endif
0039 0040 ">#
0041 # define BOOST_PP_LIST_REVERSE_O(d, s, x) (x, s)
0042 0043 ">#
0044 # /* BOOST_PP_LIST_REVERSE_D */
0045 0046 ">#
0047 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0048 #    define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list)
0049 # else
0050 #    define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_REVERSE_D_I(d, list)
0051 #    define BOOST_PP_LIST_REVERSE_D_I(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list)
0052 # endif
0053 0054 ">#
0055 # else
0056 0057 ">#
0058 # include <boost/preprocessor/control/iif.hpp>
0059 # include <boost/preprocessor/facilities/identity.hpp>
0060 # include <boost/preprocessor/list/adt.hpp>
0061 # include <boost/preprocessor/list/fold_left.hpp>
0062 0063 ">#
0064 # /* BOOST_PP_LIST_REVERSE */
0065 0066 ">#
0067 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0068 #    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)
0069 # else
0070 #    define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_REVERSE_I(list)
0071 #    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)
0072 # endif
0073 0074 ">#
0075 # define BOOST_PP_LIST_REVERSE_O(d, s, x) (x, s)
0076 0077 ">#
0078 # /* BOOST_PP_LIST_REVERSE_D */
0079 0080 ">#
0081 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0082 #    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)
0083 # else
0084 #    define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_REVERSE_D_I(d, list)
0085 #    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)
0086 # endif
0087 0088 ">#
0089 # 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))
0090 # 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))
0091 0092 ">#
0093 # endif
0094 0095 ">#
0096 # endif