forked from boostorg/preprocessor
speedups
[SVN r15272]
This commit is contained in:
@ -14,24 +14,16 @@
|
||||
# define BOOST_PREPROCESSOR_ARRAY_DATA_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_DATA */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_EDG && ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MWCW
|
||||
# define BOOST_PP_ARRAY_DATA BOOST_PP_ARRAY_DATA_I
|
||||
# elif ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MWCW
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_ARRAY_DATA(array) BOOST_PP_TUPLE_ELEM(2, 1, array)
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_DATA(array) BOOST_PP_ARRAY_DATA_I(array)
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_DATA(array) BOOST_PP_EVIL_ARRAY_DATA_D((array))
|
||||
# define BOOST_PP_EVIL_ARRAY_DATA_D(par) BOOST_PP_ARRAY_DATA_I ## par
|
||||
# define BOOST_PP_ARRAY_DATA_I(array) BOOST_PP_ARRAY_DATA_II array
|
||||
# define BOOST_PP_ARRAY_DATA_II(size, data) data
|
||||
# endif
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MWCW
|
||||
# define BOOST_PP_ARRAY_DATA_I(array) BOOST_PP_ARRAY_DATA_X array
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_DATA_I(array) BOOST_PP_ARRAY_DATA_X ## array
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ARRAY_DATA_X(s, d) d
|
||||
#
|
||||
# endif
|
||||
|
@ -20,12 +20,11 @@
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_ELEM */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_EDG
|
||||
# define BOOST_PP_ARRAY_ELEM BOOST_PP_ARRAY_ELEM_I
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array))
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_ARRAY_ELEM_I(i, array)
|
||||
# define BOOST_PP_ARRAY_ELEM_I(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ARRAY_ELEM_I(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array))
|
||||
#
|
||||
# endif
|
||||
|
@ -14,27 +14,16 @@
|
||||
# define BOOST_PREPROCESSOR_ARRAY_SIZE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_SIZE */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_EDG && ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MWCW
|
||||
# define BOOST_PP_ARRAY_SIZE BOOST_PP_ARRAY_SIZE_I
|
||||
# elif ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MWCW
|
||||
# define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_ARRAY_SIZE_I(array)
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_TUPLE_ELEM(2, 0, array)
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_EVIL_ARRAY_SIZE_D((array))
|
||||
# define BOOST_PP_EVIL_ARRAY_SIZE_D(par) BOOST_PP_ARRAY_SIZE_I ## par
|
||||
# define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_ARRAY_SIZE_I(array)
|
||||
# define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_II array
|
||||
# define BOOST_PP_ARRAY_SIZE_II(size, data) size
|
||||
# endif
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_STRICT || BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_BCC
|
||||
# define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_X array
|
||||
# elif BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MWCW
|
||||
# define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_X ## array
|
||||
# elif BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_MSVC
|
||||
# define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_D(BOOST_PP_ARRAY_SIZE_X array)
|
||||
# define BOOST_PP_ARRAY_SIZE_D(res) res
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ARRAY_SIZE_X(s, d) s
|
||||
#
|
||||
# endif
|
||||
|
Reference in New Issue
Block a user