MessagePack for C++
Loading...
Searching...
No Matches
check.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# /* See http://www.boost.org for most recent version. */
11#
12# ifndef MSGPACK_PREPROCESSOR_DETAIL_CHECK_HPP
13# define MSGPACK_PREPROCESSOR_DETAIL_CHECK_HPP
14#
17#
18# /* MSGPACK_PP_CHECK */
19#
20# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MWCC()
21# define MSGPACK_PP_CHECK(x, type) MSGPACK_PP_CHECK_D(x, type)
22# else
23# define MSGPACK_PP_CHECK(x, type) MSGPACK_PP_CHECK_OO((x, type))
24# define MSGPACK_PP_CHECK_OO(par) MSGPACK_PP_CHECK_D ## par
25# endif
26#
27# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC() && ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_DMC()
28# define MSGPACK_PP_CHECK_D(x, type) MSGPACK_PP_CHECK_1(MSGPACK_PP_CAT(MSGPACK_PP_CHECK_RESULT_, type x))
29# define MSGPACK_PP_CHECK_1(chk) MSGPACK_PP_CHECK_2(chk)
30# define MSGPACK_PP_CHECK_2(res, _) res
31# elif MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC()
32# define MSGPACK_PP_CHECK_D(x, type) MSGPACK_PP_CHECK_1(type x)
33# define MSGPACK_PP_CHECK_1(chk) MSGPACK_PP_CHECK_2(chk)
34# define MSGPACK_PP_CHECK_2(chk) MSGPACK_PP_CHECK_3((MSGPACK_PP_CHECK_RESULT_ ## chk))
35# define MSGPACK_PP_CHECK_3(im) MSGPACK_PP_CHECK_5(MSGPACK_PP_CHECK_4 im)
36# define MSGPACK_PP_CHECK_4(res, _) res
37# define MSGPACK_PP_CHECK_5(res) res
38# else /* DMC */
39# define MSGPACK_PP_CHECK_D(x, type) MSGPACK_PP_CHECK_OO((type x))
40# define MSGPACK_PP_CHECK_OO(par) MSGPACK_PP_CHECK_0 ## par
41# define MSGPACK_PP_CHECK_0(chk) MSGPACK_PP_CHECK_1(MSGPACK_PP_CAT(MSGPACK_PP_CHECK_RESULT_, chk))
42# define MSGPACK_PP_CHECK_1(chk) MSGPACK_PP_CHECK_2(chk)
43# define MSGPACK_PP_CHECK_2(res, _) res
44# endif
45#
46# define MSGPACK_PP_CHECK_RESULT_1 1, MSGPACK_PP_NIL
47#
48# endif