Files
boost_preprocessor/test/iteration.h

61 lines
1.9 KiB
C
Raw Normal View History

2002-10-03 22:26:50 +00:00
# /* **************************************************************************
# * *
# * (C) Copyright Paul Mensonides 2002.
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
2002-10-03 22:26:50 +00:00
# * *
# ************************************************************************** */
#
# /* See http://www.boost.org for most recent version. */
#
# if !BOOST_PP_IS_ITERATING
#
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/iteration.hpp>
2002-11-02 20:31:30 +00:00
# include <libs/preprocessor/test/test.h>
2002-10-03 22:26:50 +00:00
#
# define NO_FLAGS
#
2003-01-31 21:26:53 +00:00
# define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, <libs/preprocessor/test/iteration.h>))
2002-10-03 22:26:50 +00:00
# include BOOST_PP_ITERATE()
#
# undef NO_FLAGS
#
2003-01-31 21:26:53 +00:00
# define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 5, <libs/preprocessor/test/iteration.h>, 0x0001))
2002-10-03 22:26:50 +00:00
# include BOOST_PP_ITERATE()
#
2003-01-31 21:26:53 +00:00
# define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 5, <libs/preprocessor/test/iteration.h>, 0x0002))
2002-10-03 22:26:50 +00:00
# include BOOST_PP_ITERATE()
#
# elif defined NO_FLAGS
struct BOOST_PP_CAT(X, BOOST_PP_ITERATION()) {
2003-12-02 00:43:36 +00:00
BEGIN
BOOST_PP_ITERATION() >= BOOST_PP_ITERATION_START() &&
BOOST_PP_ITERATION() <= BOOST_PP_ITERATION_FINISH()
END
2002-10-03 22:26:50 +00:00
};
# elif BOOST_PP_ITERATION_DEPTH() == 1 \
2003-12-02 00:43:36 +00:00
&& BOOST_PP_ITERATION_FLAGS() == 0x0001
2002-10-03 22:26:50 +00:00
struct BOOST_PP_CAT(Y, BOOST_PP_ITERATION()) { };
# elif BOOST_PP_ITERATION_DEPTH() == 1 \
2003-12-02 00:43:36 +00:00
&& BOOST_PP_ITERATION_FLAGS() == 0x0002
2002-10-03 22:26:50 +00:00
2003-01-31 21:26:53 +00:00
# define BOOST_PP_ITERATION_PARAMS_2 (3, (1, BOOST_PP_ITERATION(), <libs/preprocessor/test/iteration.h>))
2002-10-03 22:26:50 +00:00
# include BOOST_PP_ITERATE()
# elif BOOST_PP_ITERATION_DEPTH() == 2 \
2003-12-02 00:43:36 +00:00
&& BOOST_PP_FRAME_FLAGS(1) == 0x0002
2002-10-03 22:26:50 +00:00
struct BOOST_PP_CAT(Z, BOOST_PP_CAT(BOOST_PP_ITERATION(), BOOST_PP_RELATIVE_ITERATION(1))) { };
# else
#
# error should not get here!
#
# endif