2002-11-07 23:16:43 +00:00
|
|
|
# /* **************************************************************************
|
|
|
|
# * *
|
2004-07-27 03:43:34 +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-11-07 23:16:43 +00:00
|
|
|
# * *
|
|
|
|
# ************************************************************************** */
|
|
|
|
#
|
2020-05-01 14:38:32 -04:00
|
|
|
# /* Revised by Edward Diener (2020) */
|
|
|
|
#
|
2002-11-07 23:16:43 +00:00
|
|
|
# /* See http://www.boost.org for most recent version. */
|
|
|
|
#
|
|
|
|
# ifndef BOOST_PREPROCESSOR_SEQ_FOLD_RIGHT_HPP
|
|
|
|
# define BOOST_PREPROCESSOR_SEQ_FOLD_RIGHT_HPP
|
|
|
|
#
|
2020-07-07 19:13:05 -04:00
|
|
|
# include <boost/preprocessor/arithmetic/dec.hpp>
|
2020-07-02 11:24:15 -04:00
|
|
|
# include <boost/preprocessor/cat.hpp>
|
|
|
|
# include <boost/preprocessor/detail/auto_rec.hpp>
|
|
|
|
# include <boost/preprocessor/seq/fold_left.hpp>
|
|
|
|
# include <boost/preprocessor/seq/reverse.hpp>
|
|
|
|
# include <boost/preprocessor/seq/seq.hpp>
|
|
|
|
#
|
|
|
|
# /* BOOST_PP_SEQ_FOLD_RIGHT */
|
|
|
|
#
|
|
|
|
# if 0
|
|
|
|
# define BOOST_PP_SEQ_FOLD_RIGHT(op, state, seq) ...
|
|
|
|
# endif
|
|
|
|
#
|
2020-04-29 06:38:10 -04:00
|
|
|
# include <boost/preprocessor/config/limits.hpp>
|
|
|
|
#
|
2020-04-30 09:06:06 -04:00
|
|
|
# if BOOST_PP_LIMIT_SEQ == 256
|
2020-07-07 19:13:05 -04:00
|
|
|
# define BOOST_PP_SEQ_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_RIGHT_, BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 256)))
|
2020-07-02 11:24:15 -04:00
|
|
|
# define BOOST_PP_SEQ_FOLD_RIGHT_257(op, st, ss) BOOST_PP_ERROR(0x0005)
|
2020-04-30 09:06:06 -04:00
|
|
|
# elif BOOST_PP_LIMIT_SEQ == 512
|
2020-07-07 19:13:05 -04:00
|
|
|
# define BOOST_PP_SEQ_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_RIGHT_, BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 512)))
|
2020-07-02 11:24:15 -04:00
|
|
|
# define BOOST_PP_SEQ_FOLD_RIGHT_513(op, st, ss) BOOST_PP_ERROR(0x0005)
|
2020-07-27 20:59:29 -04:00
|
|
|
# elif BOOST_PP_LIMIT_SEQ == 1024
|
|
|
|
# define BOOST_PP_SEQ_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_RIGHT_, BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 1024)))
|
|
|
|
# define BOOST_PP_SEQ_FOLD_RIGHT_1025(op, st, ss) BOOST_PP_ERROR(0x0005)
|
2020-04-29 06:38:10 -04:00
|
|
|
# else
|
2020-04-30 09:06:06 -04:00
|
|
|
# error Incorrect value for the BOOST_PP_LIMIT_SEQ limit
|
2002-11-07 23:16:43 +00:00
|
|
|
# endif
|
|
|
|
#
|
2020-07-02 11:24:15 -04:00
|
|
|
# if BOOST_PP_LIMIT_SEQ == 256
|
|
|
|
# include <boost/preprocessor/seq/limits/fold_right_256.hpp>
|
|
|
|
# elif BOOST_PP_LIMIT_SEQ == 512
|
|
|
|
# include <boost/preprocessor/seq/limits/fold_right_256.hpp>
|
|
|
|
# include <boost/preprocessor/seq/limits/fold_right_512.hpp>
|
2020-07-27 20:59:29 -04:00
|
|
|
# elif BOOST_PP_LIMIT_SEQ == 1024
|
|
|
|
# include <boost/preprocessor/seq/limits/fold_right_256.hpp>
|
|
|
|
# include <boost/preprocessor/seq/limits/fold_right_512.hpp>
|
|
|
|
# include <boost/preprocessor/seq/limits/fold_right_1024.hpp>
|
2020-07-02 11:24:15 -04:00
|
|
|
# endif
|
|
|
|
#
|
2002-11-07 23:16:43 +00:00
|
|
|
# endif
|