1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/preprocessor/arithmetic/detail/div_base.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,61 @@
1.4 +# /* Copyright (C) 2001
1.5 +# * Housemarque Oy
1.6 +# * http://www.housemarque.com
1.7 +# *
1.8 +# * Distributed under the Boost Software License, Version 1.0. (See
1.9 +# * accompanying file LICENSE_1_0.txt or copy at
1.10 +# * http://www.boost.org/LICENSE_1_0.txt)
1.11 +# */
1.12 +#
1.13 +# /* Revised by Paul Mensonides (2002) */
1.14 +#
1.15 +# /* See http://www.boost.org for most recent version. */
1.16 +#
1.17 +# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP
1.18 +# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP
1.19 +#
1.20 +# include <boost/preprocessor/arithmetic/inc.hpp>
1.21 +# include <boost/preprocessor/arithmetic/sub.hpp>
1.22 +# include <boost/preprocessor/comparison/less_equal.hpp>
1.23 +# include <boost/preprocessor/config/config.hpp>
1.24 +# include <boost/preprocessor/control/while.hpp>
1.25 +# include <boost/preprocessor/tuple/elem.hpp>
1.26 +# include <boost/preprocessor/tuple/rem.hpp>
1.27 +#
1.28 +# /* BOOST_PP_DIV_BASE */
1.29 +#
1.30 +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
1.31 +# define BOOST_PP_DIV_BASE(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
1.32 +# else
1.33 +# define BOOST_PP_DIV_BASE(x, y) BOOST_PP_DIV_BASE_I(x, y)
1.34 +# define BOOST_PP_DIV_BASE_I(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
1.35 +# endif
1.36 +#
1.37 +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
1.38 +# define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_IM(d, BOOST_PP_TUPLE_REM_3 rxy)
1.39 +# define BOOST_PP_DIV_BASE_P_IM(d, im) BOOST_PP_DIV_BASE_P_I(d, im)
1.40 +# else
1.41 +# define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy))
1.42 +# endif
1.43 +#
1.44 +# define BOOST_PP_DIV_BASE_P_I(d, r, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x)
1.45 +#
1.46 +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
1.47 +# define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_IM(d, BOOST_PP_TUPLE_REM_3 rxy)
1.48 +# define BOOST_PP_DIV_BASE_O_IM(d, im) BOOST_PP_DIV_BASE_O_I(d, im)
1.49 +# else
1.50 +# define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy))
1.51 +# endif
1.52 +#
1.53 +# define BOOST_PP_DIV_BASE_O_I(d, r, x, y) (BOOST_PP_INC(r), BOOST_PP_SUB_D(d, x, y), y)
1.54 +#
1.55 +# /* BOOST_PP_DIV_BASE_D */
1.56 +#
1.57 +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
1.58 +# define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
1.59 +# else
1.60 +# define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_DIV_BASE_D_I(d, x, y)
1.61 +# define BOOST_PP_DIV_BASE_D_I(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
1.62 +# endif
1.63 +#
1.64 +# endif