1 # /* **************************************************************************
2 #  *                                                                          *
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)
7 #  *                                                                          *
8 #  ************************************************************************** */
9 #
10 # /* Revised by Edward Diener (2020) */
11 #
12 # /* See http://www.boost.org for most recent version. */
13 #
14 # ifndef BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP
15 # define BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP
16 #
17 # include <boost/preprocessor/config/config.hpp>
18 #
19 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
20 #
21 # include <boost/preprocessor/control/while.hpp>
22 # include <boost/preprocessor/detail/auto_rec.hpp>
23 #
24 # /* BOOST_PP_DEDUCE_D */
25 #
26 # define BOOST_PP_DEDUCE_D() BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)
27 #
28 # else
29 #
30 # include <boost/preprocessor/arithmetic/dec.hpp>
31 # include <boost/preprocessor/control/while.hpp>
32 # include <boost/preprocessor/detail/auto_rec.hpp>
33 # include <boost/preprocessor/config/limits.hpp>
34 #
35 # /* BOOST_PP_DEDUCE_D */
36 #
37 # if BOOST_PP_LIMIT_WHILE == 256
38 # define BOOST_PP_DEDUCE_D() BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256))
39 # elif BOOST_PP_LIMIT_WHILE == 512
40 # define BOOST_PP_DEDUCE_D() BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 512))
41 # elif BOOST_PP_LIMIT_WHILE == 1024
42 # define BOOST_PP_DEDUCE_D() BOOST_PP_DEC(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 1024))
43 # else
44 # error Incorrect value for the BOOST_PP_LIMIT_WHILE limit
45 # endif
46 #
47 # endif
48 #
49 # endif
50