MessagePack for C++
Loading...
Searching...
No Matches
sub.hpp
Go to the documentation of this file.
1# /* Copyright (C) 2001
2# * Housemarque Oy
3# * http://www.housemarque.com
4# *
5# * Distributed under the Boost Software License, Version 1.0. (See
6# * accompanying file LICENSE_1_0.txt or copy at
7# * http://www.boost.org/LICENSE_1_0.txt)
8# */
9#
10# /* Revised by Paul Mensonides (2002) */
11#
12# /* See http://www.boost.org for most recent version. */
13#
14# ifndef MSGPACK_PREPROCESSOR_ARITHMETIC_SUB_HPP
15# define MSGPACK_PREPROCESSOR_ARITHMETIC_SUB_HPP
16#
21#
22# /* MSGPACK_PP_SUB */
23#
24# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
25# define MSGPACK_PP_SUB(x, y) MSGPACK_PP_TUPLE_ELEM(2, 0, MSGPACK_PP_WHILE(MSGPACK_PP_SUB_P, MSGPACK_PP_SUB_O, (x, y)))
26# else
27# define MSGPACK_PP_SUB(x, y) MSGPACK_PP_SUB_I(x, y)
28# define MSGPACK_PP_SUB_I(x, y) MSGPACK_PP_TUPLE_ELEM(2, 0, MSGPACK_PP_WHILE(MSGPACK_PP_SUB_P, MSGPACK_PP_SUB_O, (x, y)))
29# endif
30#
31# define MSGPACK_PP_SUB_P(d, xy) MSGPACK_PP_TUPLE_ELEM(2, 1, xy)
32#
33# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MWCC()
34# define MSGPACK_PP_SUB_O(d, xy) MSGPACK_PP_SUB_O_I xy
35# else
36# define MSGPACK_PP_SUB_O(d, xy) MSGPACK_PP_SUB_O_I(MSGPACK_PP_TUPLE_ELEM(2, 0, xy), MSGPACK_PP_TUPLE_ELEM(2, 1, xy))
37# endif
38#
39# define MSGPACK_PP_SUB_O_I(x, y) (MSGPACK_PP_DEC(x), MSGPACK_PP_DEC(y))
40#
41# /* MSGPACK_PP_SUB_D */
42#
43# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
44# define MSGPACK_PP_SUB_D(d, x, y) MSGPACK_PP_TUPLE_ELEM(2, 0, MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_SUB_P, MSGPACK_PP_SUB_O, (x, y)))
45# else
46# define MSGPACK_PP_SUB_D(d, x, y) MSGPACK_PP_SUB_D_I(d, x, y)
47# define MSGPACK_PP_SUB_D_I(d, x, y) MSGPACK_PP_TUPLE_ELEM(2, 0, MSGPACK_PP_WHILE_ ## d(MSGPACK_PP_SUB_P, MSGPACK_PP_SUB_O, (x, y)))
48# endif
49#
50# endif