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