2002-09-08 10:22:48 +00:00
|
|
|
# /* Copyright (C) 2001
|
|
|
|
# * Housemarque Oy
|
|
|
|
# * http://www.housemarque.com
|
|
|
|
# *
|
2004-09-13 15:51:29 +00:00
|
|
|
# * 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-09-08 10:22:48 +00:00
|
|
|
# */
|
|
|
|
#
|
|
|
|
# /* Revised by Paul Mensonides (2002) */
|
2020-05-01 14:38:32 -04:00
|
|
|
# /* Revised by Edward Diener (2020) */
|
2002-09-08 10:22:48 +00:00
|
|
|
#
|
|
|
|
# /* See http://www.boost.org for most recent version. */
|
|
|
|
#
|
|
|
|
# ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_HPP
|
|
|
|
# define BOOST_PREPROCESSOR_CONTROL_WHILE_HPP
|
|
|
|
#
|
2020-07-10 23:06:27 -04:00
|
|
|
# include <boost/preprocessor/arithmetic/dec.hpp>
|
2020-07-02 11:24:15 -04:00
|
|
|
# include <boost/preprocessor/cat.hpp>
|
|
|
|
# include <boost/preprocessor/config/config.hpp>
|
|
|
|
# include <boost/preprocessor/debug/error.hpp>
|
|
|
|
# include <boost/preprocessor/detail/auto_rec.hpp>
|
|
|
|
# include <boost/preprocessor/list/fold_left.hpp>
|
|
|
|
# include <boost/preprocessor/list/fold_right.hpp>
|
|
|
|
# include <boost/preprocessor/logical/bitand.hpp>
|
|
|
|
# include <boost/preprocessor/config/limits.hpp>
|
|
|
|
#
|
2002-09-08 10:22:48 +00:00
|
|
|
# /* BOOST_PP_WHILE */
|
|
|
|
#
|
2020-07-02 11:24:15 -04:00
|
|
|
# if 0
|
|
|
|
# define BOOST_PP_WHILE(pred, op, state)
|
|
|
|
# endif
|
2002-09-08 10:22:48 +00:00
|
|
|
#
|
2020-04-29 06:38:10 -04:00
|
|
|
# if BOOST_PP_LIMIT_WHILE == 256
|
2020-07-10 23:06:27 -04:00
|
|
|
# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)))
|
2020-07-27 07:54:05 -04:00
|
|
|
# elif BOOST_PP_LIMIT_WHILE == 512
|
2020-07-10 23:06:27 -04:00
|
|
|
# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512)))
|
2020-07-27 07:54:05 -04:00
|
|
|
# elif BOOST_PP_LIMIT_WHILE == 1024
|
|
|
|
# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 1024)))
|
2002-09-08 10:22:48 +00:00
|
|
|
# else
|
2020-04-29 06:38:10 -04:00
|
|
|
# error Incorrect value for the BOOST_PP_LIMIT_WHILE limit
|
2002-09-08 10:22:48 +00:00
|
|
|
# endif
|
2020-07-10 23:06:27 -04:00
|
|
|
#
|
|
|
|
# define BOOST_PP_WHILE_P(n) BOOST_PP_WHILE_P_DEC(BOOST_PP_DEC(n))
|
|
|
|
#
|
2020-07-02 11:24:15 -04:00
|
|
|
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
2020-07-10 23:06:27 -04:00
|
|
|
# define BOOST_PP_WHILE_P_DEC(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_CAT(BOOST_PP_WHILE_ , n)(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_ , n)(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_CHECK_, BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_ , n)(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL))))
|
2020-07-02 11:24:15 -04:00
|
|
|
# else
|
2020-07-10 23:06:27 -04:00
|
|
|
# define BOOST_PP_WHILE_P_DEC(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_CAT(BOOST_PP_WHILE_ , n)(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_ , n)(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)))
|
2020-07-02 11:24:15 -04:00
|
|
|
# endif
|
|
|
|
#
|
|
|
|
# define BOOST_PP_WHILE_F(d, _) 0
|
|
|
|
#
|
|
|
|
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
|
|
|
# include <boost/preprocessor/control/detail/edg/while.hpp>
|
|
|
|
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
|
|
|
# include <boost/preprocessor/control/detail/msvc/while.hpp>
|
|
|
|
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
|
|
|
|
# include <boost/preprocessor/control/detail/dmc/while.hpp>
|
|
|
|
# else
|
|
|
|
# include <boost/preprocessor/control/detail/while.hpp>
|
|
|
|
# endif
|
|
|
|
#
|
|
|
|
# if BOOST_PP_LIMIT_WHILE == 256
|
|
|
|
# define BOOST_PP_WHILE_257(p, o, s) BOOST_PP_ERROR(0x0001)
|
2020-07-27 07:54:05 -04:00
|
|
|
# elif BOOST_PP_LIMIT_WHILE == 512
|
2020-07-02 11:24:15 -04:00
|
|
|
# define BOOST_PP_WHILE_513(p, o, s) BOOST_PP_ERROR(0x0001)
|
2020-07-27 07:54:05 -04:00
|
|
|
# elif BOOST_PP_LIMIT_WHILE == 1024
|
|
|
|
# define BOOST_PP_WHILE_1025(p, o, s) BOOST_PP_ERROR(0x0001)
|
2020-07-02 11:24:15 -04:00
|
|
|
# endif
|
|
|
|
#
|
|
|
|
# define BOOST_PP_WHILE_CHECK_BOOST_PP_NIL 1
|
|
|
|
#
|
|
|
|
# if BOOST_PP_LIMIT_WHILE == 256
|
|
|
|
# include <boost/preprocessor/control/limits/while_256.hpp>
|
2020-07-27 07:54:05 -04:00
|
|
|
# elif BOOST_PP_LIMIT_WHILE == 512
|
2020-07-02 11:24:15 -04:00
|
|
|
# include <boost/preprocessor/control/limits/while_256.hpp>
|
|
|
|
# include <boost/preprocessor/control/limits/while_512.hpp>
|
2020-07-27 07:54:05 -04:00
|
|
|
# elif BOOST_PP_LIMIT_WHILE == 1024
|
|
|
|
# include <boost/preprocessor/control/limits/while_256.hpp>
|
|
|
|
# include <boost/preprocessor/control/limits/while_512.hpp>
|
|
|
|
# include <boost/preprocessor/control/limits/while_1024.hpp>
|
2020-07-02 11:24:15 -04:00
|
|
|
# endif
|
2002-09-08 10:22:48 +00:00
|
|
|
#
|
|
|
|
# endif
|