forked from boostorg/preprocessor
In C++20 variadic data can be empty. This means that BOOST_PP_VARIADIC_SIZE now returns 0 for empty data instead of 1, and that conversions to and from empty variadic data and lists or arrays, which can be empty, work properly.
This commit is contained in:
@ -15,11 +15,27 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.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/tuple/rem.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_ARRAY_ENUM */
|
# /* 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(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_I(m, args) BOOST_PP_ARRAY_ENUM_II(m, args)
|
||||||
# define BOOST_PP_ARRAY_ENUM_II(m, args) BOOST_PP_CAT(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
|
# define BOOST_PREPROCESSOR_LIST_ENUM_HPP
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/config/config.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/list/for_each_i.hpp>
|
||||||
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_LIST_ENUM */
|
# /* 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)
|
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_ENUM_O, BOOST_PP_NIL, list)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_ENUM_I(list)
|
# define BOOST_PP_LIST_ENUM(list) BOOST_PP_LIST_ENUM_I(list)
|
||||||
|
@ -17,9 +17,11 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
# include <boost/preprocessor/tuple/size.hpp>
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_REVERSE */
|
# /* BOOST_PP_TUPLE_REVERSE */
|
||||||
#
|
#
|
||||||
@ -31,7 +33,12 @@
|
|||||||
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_REVERSE(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REVERSE_O_, __VA_ARGS__)(__VA_ARGS__)
|
# define BOOST_PP_TUPLE_REVERSE(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REVERSE_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||||
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_TUPLE_REVERSE_O_1_SIZE(BOOST_PP_VARIADIC_SIZE tuple,tuple)
|
||||||
|
# define BOOST_PP_TUPLE_REVERSE_O_1_SIZE(size,tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_IF(size,size,1)) tuple
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_TUPLE_REVERSE_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_REVERSE_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_PP_TUPLE_REVERSE_O_2(size, tuple) BOOST_PP_TUPLE_REVERSE_O_1(tuple)
|
# define BOOST_PP_TUPLE_REVERSE_O_2(size, tuple) BOOST_PP_TUPLE_REVERSE_O_1(tuple)
|
||||||
# else
|
# else
|
||||||
|
@ -15,10 +15,19 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.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>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
#
|
#
|
||||||
# if BOOST_PP_VARIADICS
|
# 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,)
|
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple
|
# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple
|
||||||
|
@ -15,9 +15,11 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
# include <boost/preprocessor/tuple/size.hpp>
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_TO_ARRAY */
|
# /* BOOST_PP_TUPLE_TO_ARRAY */
|
||||||
#
|
#
|
||||||
@ -29,7 +31,12 @@
|
|||||||
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_TUPLE_SIZE(tuple), tuple)
|
# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) (BOOST_PP_TUPLE_SIZE(tuple), tuple)
|
||||||
# else
|
# 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(...) 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
|
# endif
|
||||||
# define BOOST_PP_TUPLE_TO_ARRAY_2(size, tuple) (size, tuple)
|
# define BOOST_PP_TUPLE_TO_ARRAY_2(size, tuple) (size, tuple)
|
||||||
# else
|
# else
|
||||||
|
@ -17,9 +17,11 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
# include <boost/preprocessor/tuple/size.hpp>
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_TO_LIST */
|
# /* BOOST_PP_TUPLE_TO_LIST */
|
||||||
#
|
#
|
||||||
@ -31,7 +33,12 @@
|
|||||||
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__)
|
# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||||
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_TUPLE_TO_LIST_O_1_SIZE(BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
||||||
|
# define BOOST_PP_TUPLE_TO_LIST_O_1_SIZE(size,tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_IF(size,size,1)) tuple
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple)
|
# define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple)
|
||||||
# else
|
# else
|
||||||
|
@ -15,9 +15,11 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/facilities/overload.hpp>
|
# include <boost/preprocessor/facilities/overload.hpp>
|
||||||
# include <boost/preprocessor/tuple/size.hpp>
|
# include <boost/preprocessor/tuple/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_TUPLE_TO_SEQ */
|
# /* BOOST_PP_TUPLE_TO_SEQ */
|
||||||
#
|
#
|
||||||
@ -29,7 +31,12 @@
|
|||||||
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_TUPLE_TO_SEQ(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_SEQ_O_, __VA_ARGS__)(__VA_ARGS__)
|
# define BOOST_PP_TUPLE_TO_SEQ(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_SEQ_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||||
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_TUPLE_TO_SEQ_O_1_SIZE(BOOST_PP_VARIADIC_SIZE tuple, tuple)
|
||||||
|
# define BOOST_PP_TUPLE_TO_SEQ_O_1_SIZE(size,tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_IF(size,size,1)) tuple
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_TUPLE_TO_SEQ_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_SEQ_, BOOST_PP_VARIADIC_SIZE tuple) tuple
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_PP_TUPLE_TO_SEQ_O_2(size, tuple) BOOST_PP_TUPLE_TO_SEQ_O_1(tuple)
|
# define BOOST_PP_TUPLE_TO_SEQ_O_2(size, tuple) BOOST_PP_TUPLE_TO_SEQ_O_1(tuple)
|
||||||
# else
|
# else
|
||||||
|
@ -15,14 +15,24 @@
|
|||||||
#
|
#
|
||||||
# include <boost/preprocessor/cat.hpp>
|
# include <boost/preprocessor/cat.hpp>
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/iif.hpp>
|
||||||
|
# include <boost/preprocessor/facilities/check_empty.hpp>
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_VARIADIC_SIZE */
|
# /* BOOST_PP_VARIADIC_SIZE */
|
||||||
#
|
#
|
||||||
# if BOOST_PP_VARIADICS
|
# if BOOST_PP_VARIADICS
|
||||||
# if BOOST_PP_VARIADICS_MSVC
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),)
|
# if BOOST_PP_VARIADICS_MSVC
|
||||||
|
# define BOOST_PP_VARIADIC_SIZE_NOT_EMPTY(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),)
|
||||||
|
# else
|
||||||
|
# define BOOST_PP_VARIADIC_SIZE_NOT_EMPTY(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,)
|
||||||
|
# endif
|
||||||
|
# define BOOST_PP_VARIADIC_SIZE_EMPTY(...) 0
|
||||||
|
# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_IIF(BOOST_PP_CHECK_EMPTY(__VA_ARGS__),BOOST_PP_VARIADIC_SIZE_EMPTY,BOOST_PP_VARIADIC_SIZE_NOT_EMPTY)(__VA_ARGS__)
|
||||||
|
# elif BOOST_PP_VARIADICS_MSVC
|
||||||
|
# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),)
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,)
|
# define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,)
|
||||||
# endif
|
# endif
|
||||||
# define BOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size
|
# define BOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size
|
||||||
# endif
|
# endif
|
||||||
|
@ -14,15 +14,23 @@
|
|||||||
# define BOOST_PREPROCESSOR_VARIADIC_TO_ARRAY_HPP
|
# define BOOST_PREPROCESSOR_VARIADIC_TO_ARRAY_HPP
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/tuple/to_array.hpp>
|
# include <boost/preprocessor/tuple/to_array.hpp>
|
||||||
# if BOOST_PP_VARIADICS_MSVC
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
# endif
|
|
||||||
#
|
#
|
||||||
# /* BOOST_PP_VARIADIC_TO_ARRAY */
|
# /* BOOST_PP_VARIADIC_TO_ARRAY */
|
||||||
#
|
#
|
||||||
# if BOOST_PP_VARIADICS
|
# 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__))
|
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY_2(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),(__VA_ARGS__))
|
||||||
# else
|
# else
|
||||||
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY((__VA_ARGS__))
|
# define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY((__VA_ARGS__))
|
||||||
|
@ -14,12 +14,21 @@
|
|||||||
# define BOOST_PREPROCESSOR_VARIADIC_TO_LIST_HPP
|
# define BOOST_PREPROCESSOR_VARIADIC_TO_LIST_HPP
|
||||||
#
|
#
|
||||||
# include <boost/preprocessor/config/config.hpp>
|
# include <boost/preprocessor/config/config.hpp>
|
||||||
|
# include <boost/preprocessor/control/if.hpp>
|
||||||
# include <boost/preprocessor/tuple/to_list.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 */
|
# /* BOOST_PP_VARIADIC_TO_LIST */
|
||||||
#
|
#
|
||||||
# if BOOST_PP_VARIADICS
|
# 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
|
||||||
#
|
#
|
||||||
# endif
|
# endif
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
# if BOOST_PP_VARIADICS
|
# if BOOST_PP_VARIADICS
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/elem.hpp>
|
# include <boost/preprocessor/variadic/elem.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# define ARRAY_EMPTY (0, ())
|
# define ARRAY_EMPTY (0, ())
|
||||||
@ -66,10 +67,19 @@ BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM((5, (0, 1, 2, 3, 4)))) == 5 END
|
|||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_LARGE)) == 33 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_LARGE)) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_VERY_LARGE)) == 64 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_VERY_LARGE)) == 64 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 64 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM((64, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)))) == 64 END
|
||||||
|
|
||||||
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_ONE)) == 0 END
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_ONE)) == 1 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_ONE)) == 1 END
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
// to_list
|
// to_list
|
||||||
|
|
||||||
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY), 1) == 1 END
|
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY), 1) == 1 END
|
||||||
@ -184,7 +194,10 @@ BEGIN BOOST_PP_ARRAY_ELEM(28, BOOST_PP_ARRAY_REPLACE(ARRAY_VERY_LARGE, 28, 1)) =
|
|||||||
// reverse
|
// reverse
|
||||||
|
|
||||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_REVERSE(ARRAY_VERY_LARGE)) == 64 END
|
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_ARRAY_REVERSE(ARRAY_VERY_LARGE)) == 64 END
|
||||||
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_REVERSE(ARRAY_ONE))) == 1 END
|
|
||||||
|
// BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_REVERSE(ARRAY_ONE))) == 1 END
|
||||||
|
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0, ARRAY_ONE)) == 1 END
|
||||||
|
|
||||||
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_REVERSE(ARRAY)) == 2 END
|
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_REVERSE(ARRAY)) == 2 END
|
||||||
BEGIN BOOST_PP_ARRAY_ELEM(29, BOOST_PP_ARRAY_REVERSE(ARRAY_LARGE)) == 3 END
|
BEGIN BOOST_PP_ARRAY_ELEM(29, BOOST_PP_ARRAY_REVERSE(ARRAY_LARGE)) == 3 END
|
||||||
BEGIN BOOST_PP_ARRAY_ELEM(38, BOOST_PP_ARRAY_REVERSE(ARRAY_VERY_LARGE)) == 25 END
|
BEGIN BOOST_PP_ARRAY_ELEM(38, BOOST_PP_ARRAY_REVERSE(ARRAY_VERY_LARGE)) == 25 END
|
||||||
|
10
test/seq.cxx
10
test/seq.cxx
@ -29,6 +29,7 @@
|
|||||||
# include <boost/preprocessor/list/size.hpp>
|
# include <boost/preprocessor/list/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/elem.hpp>
|
# include <boost/preprocessor/variadic/elem.hpp>
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
# include <libs/preprocessor/test/test.h>
|
# include <libs/preprocessor/test/test.h>
|
||||||
|
|
||||||
# define SEQ_NONE ()
|
# define SEQ_NONE ()
|
||||||
@ -215,7 +216,16 @@ BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_SEQ_TO_LIST(SEQ_NONE)) == 1 END
|
|||||||
|
|
||||||
#if BOOST_PP_VARIADICS
|
#if BOOST_PP_VARIADICS
|
||||||
|
|
||||||
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_SEQ_ENUM(SEQ_NONE)) == 0 END
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_SEQ_ENUM(SEQ_NONE)) == 1 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_SEQ_ENUM(SEQ_NONE)) == 1 END
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_ELEM(0,BOOST_PP_SEQ_ENUM(SEQ)) == 4 END
|
BEGIN BOOST_PP_VARIADIC_ELEM(0,BOOST_PP_SEQ_ENUM(SEQ)) == 4 END
|
||||||
BEGIN BOOST_PP_TUPLE_ELEM(2,BOOST_PP_SEQ_ELEM(0,BOOST_PP_VARIADIC_SEQ_TO_SEQ(SEQVAR))) == 8 END
|
BEGIN BOOST_PP_TUPLE_ELEM(2,BOOST_PP_SEQ_ELEM(0,BOOST_PP_VARIADIC_SEQ_TO_SEQ(SEQVAR))) == 8 END
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
# if BOOST_PP_VARIADICS
|
# if BOOST_PP_VARIADICS
|
||||||
# include <boost/preprocessor/variadic/size.hpp>
|
# include <boost/preprocessor/variadic/size.hpp>
|
||||||
# include <boost/preprocessor/variadic/elem.hpp>
|
# include <boost/preprocessor/variadic/elem.hpp>
|
||||||
|
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||||
# endif
|
# endif
|
||||||
# include <libs/preprocessor/test/test.h>
|
# include <libs/preprocessor/test/test.h>
|
||||||
# include <libs/preprocessor/test/tuple_elem_bug_test.cxx>
|
# include <libs/preprocessor/test/tuple_elem_bug_test.cxx>
|
||||||
@ -131,7 +132,16 @@ BEGIN BOOST_PP_VARIADIC_ELEM(45,BOOST_PP_TUPLE_ENUM(BOOST_PP_TUPLE_REVERSE(TUPLE
|
|||||||
|
|
||||||
// enum
|
// enum
|
||||||
|
|
||||||
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_NONE)) == 0 END
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_NONE)) == 1 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_NONE)) == 1 END
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE)) == 6 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE)) == 6 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_LARGE)) == 33 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_LARGE)) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_VERY_LARGE)) == 64 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_ENUM(TUPLE_VERY_LARGE)) == 64 END
|
||||||
@ -189,7 +199,16 @@ BEGIN BOOST_PP_TUPLE_ELEM(33, BOOST_PP_TUPLE_PUSH_FRONT(TUPLE_LARGE, 33)) == 32
|
|||||||
|
|
||||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
||||||
|
|
||||||
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(1)()) == 0 END
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(1)()) == 1 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(1)()) == 1 END
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(33)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)) == 33 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(33)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(64)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)) == 64 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM(64)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)) == 64 END
|
||||||
|
|
||||||
@ -209,7 +228,16 @@ BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM()(0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
|||||||
|
|
||||||
// rem_ctor
|
// rem_ctor
|
||||||
|
|
||||||
|
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_NONE)) == 0 END
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_NONE)) == 1 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_NONE)) == 1 END
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE)) == 6 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE)) == 6 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_LARGE)) == 33 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_LARGE)) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_VERY_LARGE)) == 64 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_TUPLE_REM_CTOR(TUPLE_VERY_LARGE)) == 64 END
|
||||||
|
@ -26,6 +26,12 @@
|
|||||||
#define VDATA_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
|
#define VDATA_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
|
||||||
#define VDATA_VERY_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
|
#define VDATA_VERY_LARGE 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
|
||||||
|
|
||||||
|
#if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
#define VDATA_EMPTY
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_VARIADIC_ELEM(4,VDATA) == 4 END
|
BEGIN BOOST_PP_VARIADIC_ELEM(4,VDATA) == 4 END
|
||||||
BEGIN BOOST_PP_VARIADIC_ELEM(6,7,11,3,8,14,85,56,92,165) == 56 END
|
BEGIN BOOST_PP_VARIADIC_ELEM(6,7,11,3,8,14,85,56,92,165) == 56 END
|
||||||
BEGIN BOOST_PP_VARIADIC_ELEM(29,VDATA_LARGE) == 29 END
|
BEGIN BOOST_PP_VARIADIC_ELEM(29,VDATA_LARGE) == 29 END
|
||||||
@ -36,6 +42,14 @@ BEGIN BOOST_PP_VARIADIC_SIZE(7,11,3,8,14,85,56,92,165) == 9 END
|
|||||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_LARGE) == 33 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_LARGE) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) == 33 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32) == 33 END
|
||||||
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_VERY_LARGE) == 64 END
|
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_VERY_LARGE) == 64 END
|
||||||
|
|
||||||
|
#if BOOST_PP_VARIADIC_HAS_OPT()
|
||||||
|
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE(VDATA_EMPTY) == 0 END
|
||||||
|
BEGIN BOOST_PP_VARIADIC_SIZE() == 0 END
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA)) == 7 END
|
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA)) == 7 END
|
||||||
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA_VERY_LARGE)) == 64 END
|
BEGIN BOOST_PP_ARRAY_SIZE(BOOST_PP_VARIADIC_TO_ARRAY(VDATA_VERY_LARGE)) == 64 END
|
||||||
BEGIN BOOST_PP_ARRAY_ELEM(4,BOOST_PP_VARIADIC_TO_ARRAY(7,11,3,8,14,85,56,92,165)) == 14 END
|
BEGIN BOOST_PP_ARRAY_ELEM(4,BOOST_PP_VARIADIC_TO_ARRAY(7,11,3,8,14,85,56,92,165)) == 14 END
|
||||||
|
Reference in New Issue
Block a user