forked from boostorg/preprocessor
Add extra iteration for fold_left and fold_right to cover maximum operations.
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
# ifndef BOOST_PREPROCESSOR_SEQ_FOLD_RIGHT_HPP
|
||||
# define BOOST_PREPROCESSOR_SEQ_FOLD_RIGHT_HPP
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/detail/auto_rec.hpp>
|
||||
# include <boost/preprocessor/seq/fold_left.hpp>
|
||||
@ -29,10 +30,10 @@
|
||||
# include <boost/preprocessor/config/limits.hpp>
|
||||
#
|
||||
# if BOOST_PP_LIMIT_SEQ == 256
|
||||
# define BOOST_PP_SEQ_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 256))
|
||||
# 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)))
|
||||
# define BOOST_PP_SEQ_FOLD_RIGHT_257(op, st, ss) BOOST_PP_ERROR(0x0005)
|
||||
# elif BOOST_PP_LIMIT_SEQ == 512
|
||||
# define BOOST_PP_SEQ_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 512))
|
||||
# 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)))
|
||||
# define BOOST_PP_SEQ_FOLD_RIGHT_513(op, st, ss) BOOST_PP_ERROR(0x0005)
|
||||
# else
|
||||
# error Incorrect value for the BOOST_PP_LIMIT_SEQ limit
|
||||
|
Reference in New Issue
Block a user