1
# /* Copyright (C) 2001
3
# * http://www.housemarque.com
5
# * Permission to copy, use, modify, sell and distribute this software is
6
# * granted provided this copyright notice appears in all copies. This
7
# * software is provided "as is" without express or implied warranty, and
8
# * with no claim as to its suitability for any purpose.
11
# /* Revised by Paul Mensonides (2002) */
13
# /* See http://www.boost.org for most recent version. */
15
# ifndef BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP
16
# define BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP
18
# include <boost/preprocessor/cat.hpp>
19
# include <boost/preprocessor/control/while.hpp>
20
# include <boost/preprocessor/debug/error.hpp>
21
# include <boost/preprocessor/detail/auto_rec.hpp>
24
# define BOOST_PP_LIST_FOLD_RIGHT(op, state, list)
27
# define BOOST_PP_LIST_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256))
29
# define BOOST_PP_LIST_FOLD_RIGHT_257(o, s, l) BOOST_PP_ERROR(0x0004)
31
# define BOOST_PP_LIST_FOLD_RIGHT_D(d, o, s, l) BOOST_PP_LIST_FOLD_RIGHT_ ## d(o, s, l)
32
# define BOOST_PP_LIST_FOLD_RIGHT_2ND BOOST_PP_LIST_FOLD_RIGHT
33
# define BOOST_PP_LIST_FOLD_RIGHT_2ND_D BOOST_PP_LIST_FOLD_RIGHT_D
35
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
36
# include <boost/preprocessor/list/detail/edg/fold_right.hpp>
38
# include <boost/preprocessor/list/detail/fold_right.hpp>