Back to home page

EIC code displayed by LXR

 
 

    


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

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_MOD_HPP
0016 # define BOOST_PREPROCESSOR_ARITHMETIC_MOD_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/detail/div_base.hpp>
0023 # include <boost/preprocessor/tuple/elem.hpp>
0024 #
0025 # /* BOOST_PP_MOD */
0026 #
0027 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0028 #    define BOOST_PP_MOD(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
0029 # else
0030 #    define BOOST_PP_MOD(x, y) BOOST_PP_MOD_I(x, y)
0031 #    define BOOST_PP_MOD_I(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
0032 # endif
0033 #
0034 # /* BOOST_PP_MOD_D */
0035 #
0036 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0037 #    define BOOST_PP_MOD_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
0038 # else
0039 #    define BOOST_PP_MOD_D(d, x, y) BOOST_PP_MOD_D_I(d, x, y)
0040 #    define BOOST_PP_MOD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
0041 # endif
0042 #
0043 # else
0044 #
0045 # include <boost/preprocessor/arithmetic/detail/div_base.hpp>
0046 # include <boost/preprocessor/control/iif.hpp>
0047 # include <boost/preprocessor/facilities/identity.hpp>
0048 # include <boost/preprocessor/tuple/elem.hpp>
0049 # include <boost/preprocessor/arithmetic/detail/is_1_number.hpp>
0050 #
0051 # /* BOOST_PP_MOD */
0052 #
0053 #    define BOOST_PP_MOD(x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_1_NUMBER(y),BOOST_PP_IDENTITY_N(0,2),BOOST_PP_MOD_DO)(x,y)
0054 #
0055 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0056 #    define BOOST_PP_MOD_DO(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
0057 # else
0058 #    define BOOST_PP_MOD_DO(x, y) BOOST_PP_MOD_I(x, y)
0059 #    define BOOST_PP_MOD_I(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
0060 # endif
0061 #
0062 # /* BOOST_PP_MOD_D */
0063 #
0064 #    define BOOST_PP_MOD_D(d, x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_1_NUMBER(y),BOOST_PP_IDENTITY_N(0,3),BOOST_PP_MOD_DO_D)(d,x,y)
0065 #
0066 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0067 #    define BOOST_PP_MOD_DO_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
0068 # else
0069 #    define BOOST_PP_MOD_DO_D(d, x, y) BOOST_PP_MOD_D_I(d, x, y)
0070 #    define BOOST_PP_MOD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
0071 # endif
0072 #
0073 # endif
0074 #
0075 # endif