Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:05:05

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 # /* Revised by Edward Diener (2020) */
0012 #
0013 # /* See http://www.boost.org for most recent version. */
0014 #
0015 # ifndef BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP
0016 # define BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP
0017 #
0018 # include <boost/preprocessor/config/config.hpp>
0019 #
0020 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0021 #
0022 # include <boost/preprocessor/arithmetic/dec.hpp>
0023 # include <boost/preprocessor/control/while.hpp>
0024 # include <boost/preprocessor/tuple/elem.hpp>
0025 #
0026 # /* BOOST_PP_SUB */
0027 #
0028 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0029 #    define BOOST_PP_SUB(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
0030 # else
0031 #    define BOOST_PP_SUB(x, y) BOOST_PP_SUB_I(x, y)
0032 #    define BOOST_PP_SUB_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
0033 # endif
0034 #
0035 # define BOOST_PP_SUB_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy)
0036 #
0037 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
0038 #    define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I xy
0039 # else
0040 #    define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy))
0041 # endif
0042 #
0043 # define BOOST_PP_SUB_O_I(x, y) (BOOST_PP_DEC(x), BOOST_PP_DEC(y))
0044 #
0045 # /* BOOST_PP_SUB_D */
0046 #
0047 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0048 #    define BOOST_PP_SUB_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
0049 # else
0050 #    define BOOST_PP_SUB_D(d, x, y) BOOST_PP_SUB_D_I(d, x, y)
0051 #    define BOOST_PP_SUB_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
0052 # endif
0053 #
0054 # else
0055 #
0056 # include <boost/preprocessor/arithmetic/dec.hpp>
0057 # include <boost/preprocessor/control/iif.hpp>
0058 # include <boost/preprocessor/control/while.hpp>
0059 # include <boost/preprocessor/facilities/identity.hpp>
0060 # include <boost/preprocessor/logical/and.hpp>
0061 # include <boost/preprocessor/logical/bitor.hpp>
0062 # include <boost/preprocessor/tuple/elem.hpp>
0063 # include <boost/preprocessor/arithmetic/detail/is_maximum_number.hpp>
0064 # include <boost/preprocessor/arithmetic/detail/is_minimum_number.hpp>
0065 #
0066 # /* BOOST_PP_SUB */
0067 #
0068 #    define BOOST_PP_SUB(x, y) BOOST_PP_IIF(BOOST_PP_BITOR(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x)),BOOST_PP_IDENTITY_N(0,2),BOOST_PP_SUB_DO)(x,y)
0069 #
0070 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0071 #    define BOOST_PP_SUB_DO(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
0072 # else
0073 #    define BOOST_PP_SUB_DO(x, y) BOOST_PP_SUB_I(x, y)
0074 #    define BOOST_PP_SUB_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
0075 # endif
0076 #
0077 # define BOOST_PP_SUB_P(d, xy) BOOST_PP_AND(BOOST_PP_TUPLE_ELEM(2, 1, xy),BOOST_PP_TUPLE_ELEM(2, 0, xy))
0078 #
0079 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
0080 #    define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I xy
0081 # else
0082 #    define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy))
0083 # endif
0084 #
0085 # define BOOST_PP_SUB_O_I(x, y) (BOOST_PP_DEC(x), BOOST_PP_DEC(y))
0086 #
0087 # /* BOOST_PP_SUB_D */
0088 #
0089 #    define BOOST_PP_SUB_D(d, x, y) BOOST_PP_IIF(BOOST_PP_BITOR(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x)),BOOST_PP_IDENTITY_N(0,3),BOOST_PP_SUB_DO_D)(d,x,y)
0090 #
0091 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0092 #    define BOOST_PP_SUB_DO_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
0093 # else
0094 #    define BOOST_PP_SUB_DO_D(d, x, y) BOOST_PP_SUB_D_I(d, x, y)
0095 #    define BOOST_PP_SUB_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
0096 # endif
0097 #
0098 # endif
0099 #
0100 # endif