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 # if !BOOST_PP_IS_ITERATING
13 #
14 # include <boost/preprocessor/cat.hpp>
15 # include <boost/preprocessor/iteration.hpp>
16 # include <libs/preprocessor/test/test.h>
17 #
18 # define NO_FLAGS
19 #
20 # define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, <libs/preprocessor/test/iteration.h>))
21 # include BOOST_PP_ITERATE()
22 #
23 # undef NO_FLAGS
24 #
25 # define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 5, <libs/preprocessor/test/iteration.h>, 0x0001))
26 # include BOOST_PP_ITERATE()
27 #
28 # define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 5, <libs/preprocessor/test/iteration.h>, 0x0002))
29 # include BOOST_PP_ITERATE()
30 #
31 # else
32 # if defined NO_FLAGS
33
BOOST_PP_CAT(X,BOOST_PP_ITERATION ())34 struct BOOST_PP_CAT(X, BOOST_PP_ITERATION()) {
35 BEGIN
36 BOOST_PP_ITERATION() >= BOOST_PP_ITERATION_START() &&
37 BOOST_PP_ITERATION() <= BOOST_PP_ITERATION_FINISH()
38 END
39 };
40
41 # elif BOOST_PP_ITERATION_DEPTH() == 1 \
42 && BOOST_PP_ITERATION_FLAGS() == 0x0001
43
BOOST_PP_CAT(Y,BOOST_PP_ITERATION ())44 struct BOOST_PP_CAT(Y, BOOST_PP_ITERATION()) { };
45
46 # elif BOOST_PP_ITERATION_DEPTH() == 1 \
47 && BOOST_PP_ITERATION_FLAGS() == 0x0002
48
49 # define BOOST_PP_ITERATION_PARAMS_2 (3, (1, BOOST_PP_ITERATION(), <libs/preprocessor/test/iteration.h>))
50 # include BOOST_PP_ITERATE()
51
52 # elif BOOST_PP_ITERATION_DEPTH() == 2 \
53 && BOOST_PP_FRAME_FLAGS(1) == 0x0002
54
55 struct BOOST_PP_CAT(Z, BOOST_PP_CAT(BOOST_PP_ITERATION(), BOOST_PP_RELATIVE_ITERATION(1))) { };
56
57 # else
58 #
59 # error should not get here!
60 #
61 # endif
62 # endif
63