1 # /* **************************************************************************
\r
3 # * (C) Copyright Paul Mensonides 2002.
\r
4 # * Distributed under the Boost Software License, Version 1.0. (See
\r
5 # * accompanying file LICENSE_1_0.txt or copy at
\r
6 # * http://www.boost.org/LICENSE_1_0.txt)
\r
8 # ************************************************************************** */
\r
10 # /* See http://www.boost.org for most recent version. */
\r
12 # ifndef BOOST_PREPROCESSOR_DETAIL_CHECK_HPP
\r
13 # define BOOST_PREPROCESSOR_DETAIL_CHECK_HPP
\r
15 # include <boost/preprocessor/cat.hpp>
\r
16 # include <boost/preprocessor/config/config.hpp>
\r
18 # /* BOOST_PP_CHECK */
\r
20 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
\r
21 # define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_D(x, type)
\r
23 # define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_OO((x, type))
\r
24 # define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_D ## par
\r
27 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
\r
28 # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, type x))
\r
29 # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk)
\r
30 # define BOOST_PP_CHECK_2(res, _) res
\r
31 # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
\r
32 # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(type x)
\r
33 # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk)
\r
34 # define BOOST_PP_CHECK_2(chk) BOOST_PP_CHECK_3((BOOST_PP_CHECK_RESULT_ ## chk))
\r
35 # define BOOST_PP_CHECK_3(im) BOOST_PP_CHECK_5(BOOST_PP_CHECK_4 im)
\r
36 # define BOOST_PP_CHECK_4(res, _) res
\r
37 # define BOOST_PP_CHECK_5(res) res
\r
39 # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_OO((type x))
\r
40 # define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_0 ## par
\r
41 # define BOOST_PP_CHECK_0(chk) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, chk))
\r
42 # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk)
\r
43 # define BOOST_PP_CHECK_2(res, _) res
\r
46 # define BOOST_PP_CHECK_RESULT_1 1, BOOST_PP_NIL
\r