forked from boostorg/preprocessor
Merge branch 'develop' into expand_number
# Conflicts: # include/boost/preprocessor/variadic/size.hpp # test/seq.cxx # test/variadic.cxx
This commit is contained in:
@ -15,11 +15,27 @@
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_ENUM */
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_ARRAY_ENUM_NOT_EMPTY(array) BOOST_PP_ARRAY_ENUM_I(BOOST_PP_TUPLE_REM_CTOR, array)
|
||||
# define BOOST_PP_ARRAY_ENUM_I(m, args) BOOST_PP_ARRAY_ENUM_II(m, args)
|
||||
# define BOOST_PP_ARRAY_ENUM_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_ARRAY_ENUM_NOT_EMPTY(array) BOOST_PP_ARRAY_ENUM_I(array)
|
||||
# define BOOST_PP_ARRAY_ENUM_I(array) BOOST_PP_TUPLE_REM_CTOR ## array
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_ENUM_NOT_EMPTY(array) BOOST_PP_TUPLE_REM_CTOR array
|
||||
# endif
|
||||
# define BOOST_PP_ARRAY_ENUM_EMPTY(array)
|
||||
# define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_IF(BOOST_PP_ARRAY_SIZE(array),BOOST_PP_ARRAY_ENUM_NOT_EMPTY,BOOST_PP_ARRAY_ENUM_EMPTY)(array)
|
||||
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_ARRAY_ENUM_I(BOOST_PP_TUPLE_REM_CTOR, array)
|
||||
# define BOOST_PP_ARRAY_ENUM_I(m, args) BOOST_PP_ARRAY_ENUM_II(m, args)
|
||||
# define BOOST_PP_ARRAY_ENUM_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
|
@ -15,12 +15,24 @@
|
||||
# define BOOST_PREPROCESSOR_LIST_ENUM_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/list/adt.hpp>
|
||||
# include <boost/preprocessor/list/for_each_i.hpp>
|
||||
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||
#
|
||||
# /* BOOST_PP_LIST_ENUM */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_LIST_ENUM_NOT_EMPTY(list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list)
|
||||
# else
|
||||
# define BOOST_PP_LIST_ENUM_NOT_EMPTY(list) BOOST_PP_LIST_ENUM_I(list)
|
||||
# define BOOST_PP_LIST_ENUM_I(list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list)
|
||||
# endif
|
||||
# define BOOST_PP_LIST_ENUM_EMPTY(list)
|
||||
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_IIF(BOOST_PP_LIST_IS_NIL(list),BOOST_PP_LIST_ENUM_EMPTY,BOOST_PP_LIST_ENUM_NOT_EMPTY)(list)
|
||||
# elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list)
|
||||
# else
|
||||
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_ENUM_I(list)
|
||||
|
@ -15,10 +15,19 @@
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_TUPLE_SIZE_CHECK(BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,))
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_TUPLE_SIZE_CHECK(BOOST_PP_VARIADIC_SIZE tuple)
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_SIZE_CHECK(size) BOOST_PP_IF(size,size,1)
|
||||
# elif BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,)
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple
|
||||
|
@ -15,9 +15,11 @@
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/facilities/overload.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_TO_ARRAY */
|
||||
#
|
||||
@ -29,7 +31,12 @@
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_TUPLE_SIZE(tuple), tuple)
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_ARRAY_, __VA_ARGS__)(__VA_ARGS__)
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
||||
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) BOOST_PP_TUPLE_TO_ARRAY_1_SIZE(BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_1_SIZE(size,tuple) (BOOST_PP_IF(size,size,1), tuple)
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
||||
# endif
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_TO_ARRAY_2(size, tuple) (size, tuple)
|
||||
# else
|
||||
|
@ -14,15 +14,23 @@
|
||||
# define BOOST_PREPROCESSOR_VARIADIC_TO_ARRAY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
# endif
|
||||
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
#
|
||||
# /* BOOST_PP_VARIADIC_TO_ARRAY */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_VARIADIC_TO_ARRAY_NON_EMPTY(...) BOOST_PP_TUPLE_TO_ARRAY_2(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),(__VA_ARGS__))
|
||||
# else
|
||||
# define BOOST_PP_VARIADIC_TO_ARRAY_NON_EMPTY(...) BOOST_PP_TUPLE_TO_ARRAY((__VA_ARGS__))
|
||||
# endif
|
||||
# define BOOST_PP_VARIADIC_TO_ARRAY_EMPTY(...) (0,())
|
||||
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_IF(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),BOOST_PP_VARIADIC_TO_ARRAY_NON_EMPTY,BOOST_PP_VARIADIC_TO_ARRAY_EMPTY)(__VA_ARGS__)
|
||||
# elif BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY_2(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),(__VA_ARGS__))
|
||||
# else
|
||||
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY((__VA_ARGS__))
|
||||
|
@ -14,12 +14,21 @@
|
||||
# define BOOST_PREPROCESSOR_VARIADIC_TO_LIST_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/tuple/to_list.hpp>
|
||||
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||
# include <boost/preprocessor/variadic/size.hpp>
|
||||
#
|
||||
# /* BOOST_PP_VARIADIC_TO_LIST */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
# define BOOST_PP_VARIADIC_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST((__VA_ARGS__))
|
||||
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||
# define BOOST_PP_VARIADIC_TO_LIST_NOT_EMPTY(...) BOOST_PP_TUPLE_TO_LIST((__VA_ARGS__))
|
||||
# define BOOST_PP_VARIADIC_TO_LIST_EMPTY(...) BOOST_PP_NIL
|
||||
# define BOOST_PP_VARIADIC_TO_LIST(...) BOOST_PP_IF(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),BOOST_PP_VARIADIC_TO_LIST_NOT_EMPTY,BOOST_PP_VARIADIC_TO_LIST_EMPTY)(__VA_ARGS__)
|
||||
# else
|
||||
# define BOOST_PP_VARIADIC_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST((__VA_ARGS__))
|
||||
# endif
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
|
Reference in New Issue
Block a user