Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:00:14

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_FIRST_N_HPP
0018 # define BOOST_PREPROCESSOR_LIST_FIRST_N_HPP
0019 0020 ">#
0021 # include <boost/preprocessor/arithmetic/dec.hpp>
0022 # include <boost/preprocessor/config/config.hpp>
0023 # include <boost/preprocessor/control/while.hpp>
0024 # include <boost/preprocessor/list/adt.hpp>
0025 # include <boost/preprocessor/list/reverse.hpp>
0026 # include <boost/preprocessor/tuple/elem.hpp>
0027 # include <boost/preprocessor/tuple/rem.hpp>
0028 0029 ">#
0030 # /* BOOST_PP_LIST_FIRST_N */
0031 0032 ">#
0033 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0034 #    define BOOST_PP_LIST_FIRST_N(count, list) BOOST_PP_LIST_REVERSE(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_WHILE(BOOST_PP_LIST_FIRST_N_P, BOOST_PP_LIST_FIRST_N_O, (count, list, BOOST_PP_NIL))))
0035 # else
0036 #    define BOOST_PP_LIST_FIRST_N(count, list) BOOST_PP_LIST_FIRST_N_I(count, list)
0037 #    define BOOST_PP_LIST_FIRST_N_I(count, list) BOOST_PP_LIST_REVERSE(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_WHILE(BOOST_PP_LIST_FIRST_N_P, BOOST_PP_LIST_FIRST_N_O, (count, list, BOOST_PP_NIL))))
0038 # endif
0039 0040 ">#
0041 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0042 #    define BOOST_PP_LIST_FIRST_N_P(d, data) BOOST_PP_TUPLE_ELEM(3, 0, data)
0043 # else
0044 #    define BOOST_PP_LIST_FIRST_N_P(d, data) BOOST_PP_LIST_FIRST_N_P_I data
0045 #    define BOOST_PP_LIST_FIRST_N_P_I(c, l, nl) c
0046 # endif
0047 0048 ">#
0049 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
0050 #    define BOOST_PP_LIST_FIRST_N_O(d, data) BOOST_PP_LIST_FIRST_N_O_D data
0051 # else
0052 #    define BOOST_PP_LIST_FIRST_N_O(d, data) BOOST_PP_LIST_FIRST_N_O_D(BOOST_PP_TUPLE_ELEM(3, 0, data), BOOST_PP_TUPLE_ELEM(3, 1, data), BOOST_PP_TUPLE_ELEM(3, 2, data))
0053 # endif
0054 0055 ">#
0056 # define BOOST_PP_LIST_FIRST_N_O_D(c, l, nl) (BOOST_PP_DEC(c), BOOST_PP_LIST_REST(l), (BOOST_PP_LIST_FIRST(l), nl))
0057 0058 ">#
0059 # /* BOOST_PP_LIST_FIRST_N_D */
0060 0061 ">#
0062 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0063 #    define BOOST_PP_LIST_FIRST_N_D(d, count, list) BOOST_PP_LIST_REVERSE_D(d, BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_WHILE_ ## d(BOOST_PP_LIST_FIRST_N_P, BOOST_PP_LIST_FIRST_N_O, (count, list, BOOST_PP_NIL))))
0064 # else
0065 #    define BOOST_PP_LIST_FIRST_N_D(d, count, list) BOOST_PP_LIST_FIRST_N_D_I(d, count, list)
0066 #    define BOOST_PP_LIST_FIRST_N_D_I(d, count, list) BOOST_PP_LIST_REVERSE_D(d, BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_WHILE_ ## d(BOOST_PP_LIST_FIRST_N_P, BOOST_PP_LIST_FIRST_N_O, (count, list, BOOST_PP_NIL))))
0067 # endif
0068 0069 ">#
0070 # endif