1 # /* **************************************************************************
3 # * (C) Copyright Paul Mensonides 2002.
4 # * Distributed under the Boost Software License, Version 1.0. (See
5 # * accompanying file LICENSE_1_0.txt or copy at
6 # * http://www.boost.org/LICENSE_1_0.txt)
8 # ************************************************************************** */
10 # /* Revised by Edward Diener (2020) */
12 # /* See http://www.boost.org for most recent version. */
14 # ifndef BOOST_PREPROCESSOR_REPETITION_DEDUCE_R_HPP
15 # define BOOST_PREPROCESSOR_REPETITION_DEDUCE_R_HPP
17 # include <boost/preprocessor/config/config.hpp>
19 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
21 # include <boost/preprocessor/detail/auto_rec.hpp>
22 # include <boost/preprocessor/repetition/for.hpp>
24 # /* BOOST_PP_DEDUCE_R */
26 # define BOOST_PP_DEDUCE_R() BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256)
30 # /* BOOST_PP_DEDUCE_R */
32 # include <boost/preprocessor/arithmetic/dec.hpp>
33 # include <boost/preprocessor/detail/auto_rec.hpp>
34 # include <boost/preprocessor/repetition/for.hpp>
35 # include <boost/preprocessor/config/limits.hpp>
37 # if BOOST_PP_LIMIT_FOR == 256
38 # define BOOST_PP_DEDUCE_R() BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256))
39 # elif BOOST_PP_LIMIT_FOR == 512
40 # define BOOST_PP_DEDUCE_R() BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 512))
41 # elif BOOST_PP_LIMIT_FOR == 1024
42 # define BOOST_PP_DEDUCE_R() BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 1024))
44 # error Incorrect value for the BOOST_PP_LIMIT_FOR limit