epoc32/include/stdapis/boost/preprocessor/arithmetic/sub.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/preprocessor/arithmetic/sub.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,50 @@
     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_SUB_HPP
    1.18 +# define BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP
    1.19 +#
    1.20 +# include <boost/preprocessor/arithmetic/dec.hpp>
    1.21 +# include <boost/preprocessor/config/config.hpp>
    1.22 +# include <boost/preprocessor/control/while.hpp>
    1.23 +# include <boost/preprocessor/tuple/elem.hpp>
    1.24 +#
    1.25 +# /* BOOST_PP_SUB */
    1.26 +#
    1.27 +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
    1.28 +#    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)))
    1.29 +# else
    1.30 +#    define BOOST_PP_SUB(x, y) BOOST_PP_SUB_I(x, y)
    1.31 +#    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)))
    1.32 +# endif
    1.33 +#
    1.34 +# define BOOST_PP_SUB_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy)
    1.35 +#
    1.36 +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
    1.37 +#    define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I xy
    1.38 +# else
    1.39 +#    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))
    1.40 +# endif
    1.41 +#
    1.42 +# define BOOST_PP_SUB_O_I(x, y) (BOOST_PP_DEC(x), BOOST_PP_DEC(y))
    1.43 +#
    1.44 +# /* BOOST_PP_SUB_D */
    1.45 +#
    1.46 +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
    1.47 +#    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)))
    1.48 +# else
    1.49 +#    define BOOST_PP_SUB_D(d, x, y) BOOST_PP_SUB_D_I(d, x, y)
    1.50 +#    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)))
    1.51 +# endif
    1.52 +#
    1.53 +# endif