Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/preprocessor/test/iteration.h @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 1.9 KB
Line 
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# elif defined NO_FLAGS
32
33struct BOOST_PP_CAT(X, BOOST_PP_ITERATION()) {
34    BEGIN
35        BOOST_PP_ITERATION() >= BOOST_PP_ITERATION_START() &&
36        BOOST_PP_ITERATION() <= BOOST_PP_ITERATION_FINISH()
37    END
38};
39
40# elif BOOST_PP_ITERATION_DEPTH() == 1 \
41    && BOOST_PP_ITERATION_FLAGS() == 0x0001
42
43struct BOOST_PP_CAT(Y, BOOST_PP_ITERATION()) { };
44
45# elif BOOST_PP_ITERATION_DEPTH() == 1 \
46    && BOOST_PP_ITERATION_FLAGS() == 0x0002
47
48# define BOOST_PP_ITERATION_PARAMS_2 (3, (1, BOOST_PP_ITERATION(), <libs/preprocessor/test/iteration.h>))
49# include BOOST_PP_ITERATE()
50
51# elif BOOST_PP_ITERATION_DEPTH() == 2 \
52    && BOOST_PP_FRAME_FLAGS(1) == 0x0002
53
54struct BOOST_PP_CAT(Z, BOOST_PP_CAT(BOOST_PP_ITERATION(), BOOST_PP_RELATIVE_ITERATION(1))) { };
55
56# else
57#
58# error should not get here!
59#
60# endif
Note: See TracBrowser for help on using the repository browser.