]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/preprocessor/test/control.cxx
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / preprocessor / test / control.cxx
CommitLineData
7c673cae
FG
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#
20effc67 12# include <boost/preprocessor/config/limits.hpp>
7c673cae
FG
13# include <boost/preprocessor/arithmetic/add.hpp>
14# include <boost/preprocessor/arithmetic/dec.hpp>
15# include <boost/preprocessor/control.hpp>
16# include <libs/preprocessor/test/test.h>
17
18# define TR(x) 1
19
20BEGIN BOOST_PP_EXPR_IIF(0, TR)(0) == 0 END
21BEGIN BOOST_PP_EXPR_IIF(1, TR)(0) == 1 END
22
23BEGIN BOOST_PP_EXPR_IF(3, TR)(0) == 1 END
24BEGIN BOOST_PP_EXPR_IF(0, TR)(0) == 0 END
25
26BEGIN BOOST_PP_IIF(0, 1, 0) == 0 END
27BEGIN BOOST_PP_IIF(1, 1, 0) == 1 END
28
29BEGIN BOOST_PP_IF(0, 1, 0) == 0 END
30BEGIN BOOST_PP_IF(9, 1, 0) == 1 END
31
32# define PRED(d, state) state
33# define OP_1(d, state) BOOST_PP_DEC(state)
34
35BEGIN BOOST_PP_WHILE(PRED, OP_1, 50) == 0 END
36
37# define OP_2(d, state) BOOST_PP_DEC(BOOST_PP_ADD(BOOST_PP_WHILE(PRED, OP_1, state), state))
38# define OP_3(d, state) BOOST_PP_DEC(BOOST_PP_ADD_D(d, BOOST_PP_WHILE_ ## d(PRED, OP_1, state), state))
39
40BEGIN BOOST_PP_WHILE(PRED, OP_2, 10) == 0 END
41BEGIN BOOST_PP_WHILE(PRED, OP_3, 10) == 0 END
20effc67
TL
42
43#if BOOST_PP_LIMIT_MAG != 256
44
45BEGIN BOOST_PP_WHILE(PRED, OP_1, BOOST_PP_LIMIT_MAG) == 0 END
46
47#endif