MessagePack for C++
split.hpp
Go to the documentation of this file.
1 # /* **************************************************************************
2 # * *
3 # * (C) Copyright Paul Mensonides 2002.
4 # * Distributed under the Boost Software License, Version 1.0. (See
5 # * accompanying file LICENSE_1_0.txt or copy at
6 # * http://www.boost.org/LICENSE_1_0.txt)
7 # * *
8 # ************************************************************************** */
9 #
10 # ifndef MSGPACK_PREPROCESSOR_DETAIL_SPLIT_HPP
11 # define MSGPACK_PREPROCESSOR_DETAIL_SPLIT_HPP
12 #
14 #
15 # /* MSGPACK_PP_SPLIT */
16 #
17 # if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MWCC()
18 # define MSGPACK_PP_SPLIT(n, im) MSGPACK_PP_SPLIT_I((n, im))
19 # define MSGPACK_PP_SPLIT_I(par) MSGPACK_PP_SPLIT_II ## par
20 # define MSGPACK_PP_SPLIT_II(n, a, b) MSGPACK_PP_SPLIT_ ## n(a, b)
21 # elif MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC()
22 # define MSGPACK_PP_SPLIT(n, im) MSGPACK_PP_SPLIT_I(n((im)))
23 # define MSGPACK_PP_SPLIT_I(n) MSGPACK_PP_SPLIT_ID(MSGPACK_PP_SPLIT_II_ ## n)
24 # define MSGPACK_PP_SPLIT_II_0(s) MSGPACK_PP_SPLIT_ID(MSGPACK_PP_SPLIT_0 s)
25 # define MSGPACK_PP_SPLIT_II_1(s) MSGPACK_PP_SPLIT_ID(MSGPACK_PP_SPLIT_1 s)
26 # define MSGPACK_PP_SPLIT_ID(id) id
27 # else
28 # define MSGPACK_PP_SPLIT(n, im) MSGPACK_PP_SPLIT_I(n)(im)
29 # define MSGPACK_PP_SPLIT_I(n) MSGPACK_PP_SPLIT_ ## n
30 # endif
31 #
32 # define MSGPACK_PP_SPLIT_0(a, b) a
33 # define MSGPACK_PP_SPLIT_1(a, b) b
34 #
35 # endif