1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/preprocessor/repetition/enum.hpp Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,66 @@
1.4 +# /* Copyright (C) 2001
1.5 +# * Housemarque Oy
1.6 +# * http://www.housemarque.com
1.7 +# *
1.8 +# * Distributed under the Boost Software License, Version 1.0. (See
1.9 +# * accompanying file LICENSE_1_0.txt or copy at
1.10 +# * http://www.boost.org/LICENSE_1_0.txt)
1.11 +# */
1.12 +#
1.13 +# /* Revised by Paul Mensonides (2002) */
1.14 +#
1.15 +# /* See http://www.boost.org for most recent version. */
1.16 +#
1.17 +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_HPP
1.18 +# define BOOST_PREPROCESSOR_REPETITION_ENUM_HPP
1.19 +#
1.20 +# include <boost/preprocessor/cat.hpp>
1.21 +# include <boost/preprocessor/config/config.hpp>
1.22 +# include <boost/preprocessor/debug/error.hpp>
1.23 +# include <boost/preprocessor/detail/auto_rec.hpp>
1.24 +# include <boost/preprocessor/punctuation/comma_if.hpp>
1.25 +# include <boost/preprocessor/repetition/repeat.hpp>
1.26 +# include <boost/preprocessor/tuple/elem.hpp>
1.27 +# include <boost/preprocessor/tuple/rem.hpp>
1.28 +#
1.29 +# /* BOOST_PP_ENUM */
1.30 +#
1.31 +# if 0
1.32 +# define BOOST_PP_ENUM(count, macro, data)
1.33 +# endif
1.34 +#
1.35 +# define BOOST_PP_ENUM BOOST_PP_CAT(BOOST_PP_ENUM_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
1.36 +#
1.37 +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
1.38 +# define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d))
1.39 +# define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d))
1.40 +# define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d))
1.41 +# else
1.42 +# define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_ENUM_1_I(c, m, d)
1.43 +# define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_ENUM_2_I(c, m, d)
1.44 +# define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_ENUM_3_I(c, m, d)
1.45 +# define BOOST_PP_ENUM_1_I(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d))
1.46 +# define BOOST_PP_ENUM_2_I(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d))
1.47 +# define BOOST_PP_ENUM_3_I(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d))
1.48 +# endif
1.49 +#
1.50 +# define BOOST_PP_ENUM_4(c, m, d) BOOST_PP_ERROR(0x0003)
1.51 +#
1.52 +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
1.53 +# define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
1.54 +# define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
1.55 +# define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
1.56 +# define BOOST_PP_ENUM_M_1_IM(z, n, im) BOOST_PP_ENUM_M_1_I(z, n, im)
1.57 +# define BOOST_PP_ENUM_M_2_IM(z, n, im) BOOST_PP_ENUM_M_2_I(z, n, im)
1.58 +# define BOOST_PP_ENUM_M_3_IM(z, n, im) BOOST_PP_ENUM_M_3_I(z, n, im)
1.59 +# else
1.60 +# define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
1.61 +# define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
1.62 +# define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
1.63 +# endif
1.64 +#
1.65 +# define BOOST_PP_ENUM_M_1_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d)
1.66 +# define BOOST_PP_ENUM_M_2_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d)
1.67 +# define BOOST_PP_ENUM_M_3_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d)
1.68 +#
1.69 +# endif