forked from boostorg/preprocessor
speedups
[SVN r15272]
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
|
||||
# * modify, sell, and distribute this software is granted provided *
|
||||
# * this copyright notice appears in all copies. This software is *
|
||||
# * provided "as is" without express or implied warranty, and with *
|
||||
# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
|
||||
# * modify, sell, and distribute this software is granted provided *
|
||||
# * this copyright notice appears in all copies. This software is *
|
||||
# * provided "as is" without express or implied warranty, and with *
|
||||
# * no claim at to its suitability for any purpose. *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
@ -13,41 +13,21 @@
|
||||
# ifndef BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP
|
||||
# define BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# //include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
#
|
||||
# /* BOOST_PP_AUTO_REC */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_EDG && ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MWCW
|
||||
# define BOOST_PP_AUTO_REC(pred, n) BOOST_PP_CAT(BOOST_PP_NODE_ENTRY_, n)(pred)
|
||||
# else
|
||||
# define BOOST_PP_AUTO_REC(pred, n) BOOST_PP_AUTO_REC_D(pred, n)
|
||||
# define BOOST_PP_AUTO_REC_D(pred, n) BOOST_PP_NODE_ENTRY_ ## n(pred)
|
||||
# endif
|
||||
# define BOOST_PP_AUTO_REC(pred, n) BOOST_PP_NODE_ENTRY_ ## n(pred)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MSVC
|
||||
# define BOOST_PP_NODE_ENTRY_256(p) BOOST_PP_NODE_128(p)(p)(p)(p)(p)(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_128(p) BOOST_PP_NODE_64(p)(p)(p)(p)(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_64(p) BOOST_PP_NODE_32(p)(p)(p)(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_32(p) BOOST_PP_NODE_16(p)(p)(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_16(p) BOOST_PP_NODE_8(p)(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_8(p) BOOST_PP_NODE_4(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_4(p) BOOST_PP_NODE_2(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_2(p) BOOST_PP_NODE_1(p)
|
||||
# else
|
||||
# define BOOST_PP_NODE_ENTRY_256(p) BOOST_PP_NODE_IDENTITY((BOOST_PP_NODE_128(p)(p)(p)(p)(p)(p)(p)(p)))
|
||||
# define BOOST_PP_NODE_ENTRY_128(p) BOOST_PP_NODE_IDENTITY((BOOST_PP_NODE_64(p)(p)(p)(p)(p)(p)(p)))
|
||||
# define BOOST_PP_NODE_ENTRY_64(p) BOOST_PP_NODE_IDENTITY((BOOST_PP_NODE_32(p)(p)(p)(p)(p)(p)))
|
||||
# define BOOST_PP_NODE_ENTRY_32(p) BOOST_PP_NODE_IDENTITY((BOOST_PP_NODE_16(p)(p)(p)(p)(p)))
|
||||
# define BOOST_PP_NODE_ENTRY_16(p) BOOST_PP_NODE_IDENTITY((BOOST_PP_NODE_8(p)(p)(p)(p)))
|
||||
# define BOOST_PP_NODE_ENTRY_8(p) BOOST_PP_NODE_IDENTITY((BOOST_PP_NODE_4(p)(p)(p)))
|
||||
# define BOOST_PP_NODE_ENTRY_4(p) BOOST_PP_NODE_IDENTITY((BOOST_PP_NODE_2(p)(p)))
|
||||
# define BOOST_PP_NODE_ENTRY_2(p) BOOST_PP_NODE_IDENTITY((BOOST_PP_NODE_1(p)))
|
||||
# define BOOST_PP_NODE_IDENTITY(id) BOOST_PP_NODE_IDENTITY_3(BOOST_PP_NODE_IDENTITY_2 id)
|
||||
# define BOOST_PP_NODE_IDENTITY_2(n) n
|
||||
# define BOOST_PP_NODE_IDENTITY_3(n) n
|
||||
# endif
|
||||
# define BOOST_PP_NODE_ENTRY_256(p) BOOST_PP_NODE_128(p)(p)(p)(p)(p)(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_128(p) BOOST_PP_NODE_64(p)(p)(p)(p)(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_64(p) BOOST_PP_NODE_32(p)(p)(p)(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_32(p) BOOST_PP_NODE_16(p)(p)(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_16(p) BOOST_PP_NODE_8(p)(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_8(p) BOOST_PP_NODE_4(p)(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_4(p) BOOST_PP_NODE_2(p)(p)
|
||||
# define BOOST_PP_NODE_ENTRY_2(p) BOOST_PP_NODE_1(p)
|
||||
#
|
||||
# define BOOST_PP_NODE_128(p) BOOST_PP_IIF(p(128), BOOST_PP_NODE_64, BOOST_PP_NODE_192)
|
||||
# define BOOST_PP_NODE_64(p) BOOST_PP_IIF(p(64), BOOST_PP_NODE_32, BOOST_PP_NODE_96)
|
||||
|
@ -18,30 +18,24 @@
|
||||
#
|
||||
# /* BOOST_PP_CHECK */
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_STRICT
|
||||
# if BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_IDEAL
|
||||
# define BOOST_PP_CHECK BOOST_PP_CHECK_D
|
||||
# else
|
||||
# define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_D(x, type)
|
||||
# endif
|
||||
# elif BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MWCW
|
||||
# define BOOST_PP_CHECK(x, type) BOOST_PP_EVIL_CHECK_D((x, type))
|
||||
# define BOOST_PP_EVIL_CHECK_D(par) BOOST_PP_CHECK_D ## par
|
||||
# elif BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MSVC
|
||||
# define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_D(x, type)
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_D(x, type)
|
||||
# else
|
||||
# define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_OO((x, type))
|
||||
# define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_D ## par
|
||||
# endif
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MSVC
|
||||
# define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, type x))
|
||||
# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk)
|
||||
# define BOOST_PP_CHECK_2(res, _) res
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, type x))
|
||||
# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk)
|
||||
# define BOOST_PP_CHECK_2(res, _) res
|
||||
# else
|
||||
# define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(type x)
|
||||
# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk)
|
||||
# define BOOST_PP_CHECK_2(chk) BOOST_PP_CHECK_3((BOOST_PP_CHECK_RESULT_ ## chk))
|
||||
# define BOOST_PP_CHECK_3(im) BOOST_PP_CHECK_5(BOOST_PP_CHECK_4 im)
|
||||
# define BOOST_PP_CHECK_4(res, _) res
|
||||
# define BOOST_PP_CHECK_5(res) res
|
||||
# define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(type x)
|
||||
# define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk)
|
||||
# define BOOST_PP_CHECK_2(chk) BOOST_PP_CHECK_3((BOOST_PP_CHECK_RESULT_ ## chk))
|
||||
# define BOOST_PP_CHECK_3(im) BOOST_PP_CHECK_5(BOOST_PP_CHECK_4 im)
|
||||
# define BOOST_PP_CHECK_4(res, _) res
|
||||
# define BOOST_PP_CHECK_5(res) res
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_CHECK_RESULT_1 1, BOOST_PP_NIL
|
||||
|
@ -13,18 +13,18 @@
|
||||
# ifndef BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP
|
||||
# define BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/detail/check.hpp>
|
||||
#
|
||||
# /* BOOST_PP_IS_BINARY */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_EDG
|
||||
# define BOOST_PP_IS_BINARY BOOST_PP_IS_BINARY_D
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_IS_BINARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK)
|
||||
# else
|
||||
# define BOOST_PP_IS_BINARY(x) BOOST_PP_IS_BINARY_D(x)
|
||||
# define BOOST_PP_IS_BINARY(x) BOOST_PP_IS_BINARY_I(x)
|
||||
# define BOOST_PP_IS_BINARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_IS_BINARY_D(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK)
|
||||
#
|
||||
# define BOOST_PP_IS_BINARY_CHECK(a, b) 1
|
||||
# define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_BINARY_CHECK 0, BOOST_PP_NIL
|
||||
#
|
||||
|
@ -13,18 +13,18 @@
|
||||
# ifndef BOOST_PREPROCESSOR_DETAIL_IS_NULLARY_HPP
|
||||
# define BOOST_PREPROCESSOR_DETAIL_IS_NULLARY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/detail/check.hpp>
|
||||
#
|
||||
# /* BOOST_PP_IS_NULLARY */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_EDG
|
||||
# define BOOST_PP_IS_NULLARY BOOST_PP_IS_NULLARY_D
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_IS_NULLARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_NULLARY_CHECK)
|
||||
# else
|
||||
# define BOOST_PP_IS_NULLARY(x) BOOST_PP_IS_NULLARY_D(x)
|
||||
# define BOOST_PP_IS_NULLARY(x) BOOST_PP_IS_NULLARY_I(x)
|
||||
# define BOOST_PP_IS_NULLARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_NULLARY_CHECK)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_IS_NULLARY_D(x) BOOST_PP_CHECK(x, BOOST_PP_IS_NULLARY_CHECK)
|
||||
#
|
||||
# define BOOST_PP_IS_NULLARY_CHECK() 1
|
||||
# define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_NULLARY_CHECK 0, BOOST_PP_NIL
|
||||
#
|
||||
|
@ -13,18 +13,18 @@
|
||||
# ifndef BOOST_PREPROCESSOR_DETAIL_IS_UNARY_HPP
|
||||
# define BOOST_PREPROCESSOR_DETAIL_IS_UNARY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/detail/check.hpp>
|
||||
#
|
||||
# /* BOOST_PP_IS_UNARY */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_EDG
|
||||
# define BOOST_PP_IS_UNARY BOOST_PP_IS_UNARY_D
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_IS_UNARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_UNARY_CHECK)
|
||||
# else
|
||||
# define BOOST_PP_IS_UNARY(x) BOOST_PP_IS_UNARY_D(x)
|
||||
# define BOOST_PP_IS_UNARY(x) BOOST_PP_IS_UNARY_I(x)
|
||||
# define BOOST_PP_IS_UNARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_UNARY_CHECK)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_IS_UNARY_D(x) BOOST_PP_CHECK(x, BOOST_PP_IS_UNARY_CHECK)
|
||||
#
|
||||
# define BOOST_PP_IS_UNARY_CHECK(a) 1
|
||||
# define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_UNARY_CHECK 0, BOOST_PP_NIL
|
||||
#
|
||||
|
Reference in New Issue
Block a user