Assume variadic macro support.

This commit is contained in:
Edward Diener
2020-09-17 18:25:36 -04:00
parent 8288ce7575
commit 5fd12d32d4
80 changed files with 864 additions and 9334 deletions
+8 -174
View File
@@ -54,25 +54,6 @@ alias preprocessor
[ compile variadic.cpp ]
;
alias preprocessor_nvm
:
[ compile arithmetic.cpp : <define>BOOST_PP_VARIADICS=0 : arithmetic_nvm ]
[ compile array.cpp : <define>BOOST_PP_VARIADICS=0 : array_nvm ]
[ compile comparison.cpp : <define>BOOST_PP_VARIADICS=0 : comparison_nvm ]
[ compile control.cpp : <define>BOOST_PP_VARIADICS=0 : control_nvm ]
[ compile debug.cpp : <define>BOOST_PP_VARIADICS=0 : debug_nvm ]
[ compile facilities.cpp : <define>BOOST_PP_VARIADICS=0 : facilities_nvm ]
[ compile iteration.cpp : <define>BOOST_PP_VARIADICS=0 : iteration_nvm ]
[ compile list.cpp : <define>BOOST_PP_VARIADICS=0 : list_nvm ]
[ compile logical.cpp : <define>BOOST_PP_VARIADICS=0 : logical_nvm ]
[ compile repetition.cpp : <define>BOOST_PP_VARIADICS=0 : repetition_nvm ]
[ compile selection.cpp : <define>BOOST_PP_VARIADICS=0 : selection_nvm ]
[ compile seq.cpp : <define>BOOST_PP_VARIADICS=0 : seq_nvm ]
[ compile slot.cpp : <define>BOOST_PP_VARIADICS=0 : slot_nvm ]
[ compile stringize.cpp : <define>BOOST_PP_VARIADICS=0 : stringize_nvm ]
[ compile tuple.cpp : <define>BOOST_PP_VARIADICS=0 : tuple_nvm ]
;
alias preprocessor_number_512
:
[ compile arithmetic.cpp : <define>BOOST_PP_LIMIT_MAG=512 : arithmetic_num_512 ]
@@ -127,56 +108,6 @@ alias preprocessor_v_256
[ compile variadic.cpp : <define>BOOST_PP_LIMIT_VARIADIC=256 <define>BOOST_PP_LIMIT_TUPLE=256 : variadic_v_256 ]
;
alias preprocessor_v_128_c
:
[ compile array.c : <define>BOOST_PP_LIMIT_TUPLE=128 <define>BOOST_PP_VARIADICS=0 : array_v_128_c ]
[ compile tuple.c : <define>BOOST_PP_LIMIT_TUPLE=128 <define>BOOST_PP_VARIADICS=0 : tuple_v_128_c ]
;
alias preprocessor_v_256_c
:
[ compile array.c : <define>BOOST_PP_LIMIT_TUPLE=256 <define>BOOST_PP_VARIADICS=0 : array_v_256_c ]
[ compile tuple.c : <define>BOOST_PP_LIMIT_TUPLE=256 <define>BOOST_PP_VARIADICS=0 : tuple_v_256_c ]
;
alias preprocessor_number_nvm_512
:
[ compile arithmetic.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : arithmetic_nvm_num_512 ]
[ compile array.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : array_nvm_num_512 ]
[ compile comparison.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : comparison_nvm_num_512 ]
[ compile control.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : control_nvm_num_512 ]
[ compile debug.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : debug_nvm_num_512 ]
[ compile facilities.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : facilities_nvm_num_512 ]
[ compile iteration.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_LIMIT_ITERATION=512 <define>BOOST_PP_VARIADICS=0 : iteration_nvm_num_512 ]
[ compile list.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_LIMIT_FOR=512 <define>BOOST_PP_VARIADICS=0 : list_nvm_num_512 ]
[ compile logical.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : logical_nvm_num_512 ]
[ compile repetition.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : repetition_nvm_num_512 ]
[ compile selection.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : selection_nvm_num_512 ]
[ compile seq.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_LIMIT_SEQ=512 <define>BOOST_PP_VARIADICS=0 : seq_nvm_num_512 ]
[ compile slot.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : slot_nvm_num_512 ]
[ compile stringize.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : stringize_nvm_num_512 ]
[ compile tuple.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : tuple_nvm_num_512 ]
;
alias preprocessor_number_nvm_1024
:
[ compile arithmetic.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : arithmetic_nvm_num_1024 ]
[ compile array.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : array_nvm_num_1024 ]
[ compile comparison.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : comparison_nvm_num_1024 ]
[ compile control.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : control_nvm_num_1024 ]
[ compile debug.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : debug_nvm_num_1024 ]
[ compile facilities.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : facilities_nvm_num_1024 ]
[ compile iteration.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_LIMIT_ITERATION=1024 <define>BOOST_PP_VARIADICS=0 : iteration_nvm_num_1024 ]
[ compile list.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_LIMIT_FOR=1024 <define>BOOST_PP_VARIADICS=0 : list_nvm_num_1024 ]
[ compile logical.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : logical_nvm_num_1024 ]
[ compile repetition.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : repetition_nvm_num_1024 ]
[ compile selection.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : selection_nvm_num_1024 ]
[ compile seq.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_LIMIT_SEQ=1024 <define>BOOST_PP_VARIADICS=0 : seq_nvm_num_1024 ]
[ compile slot.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : slot_nvm_num_1024 ]
[ compile stringize.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : stringize_nvm_num_1024 ]
[ compile tuple.cpp : <define>BOOST_PP_LIMIT_MAG=1024 <define>BOOST_PP_VARIADICS=0 : tuple_nvm_num_1024 ]
;
alias preprocessor_c
:
[ compile arithmetic.c
@@ -241,62 +172,6 @@ alias preprocessor_c
]
;
alias preprocessor_c_nvm
:
[ compile arithmetic.c
: <define>BOOST_PP_VARIADICS=0
: arithmetic_c_nvm
]
[ compile array.c
: <define>BOOST_PP_VARIADICS=0
: array_c_nvm
]
[ compile comparison.c
: <define>BOOST_PP_VARIADICS=0
: comparison_c_nvm
]
[ compile control.c
: <define>BOOST_PP_VARIADICS=0
: control_c_nvm
]
[ compile debug.c
: <define>BOOST_PP_VARIADICS=0
: debug_c_nvm
]
[ compile facilities.c
: <define>BOOST_PP_VARIADICS=0
: facilities_c_nvm
]
[ compile list.c
: <define>BOOST_PP_VARIADICS=0
: list_c_nvm
]
[ compile logical.c
: <define>BOOST_PP_VARIADICS=0
: logical_c_nvm
]
[ compile selection.c
: <define>BOOST_PP_VARIADICS=0
: selection_c_nvm
]
[ compile seq.c
: <define>BOOST_PP_VARIADICS=0
: seq_c_nvm
]
[ compile slot.c
: <define>BOOST_PP_VARIADICS=0
: slot_c_nvm
]
[ compile stringize.c
: <define>BOOST_PP_VARIADICS=0
: stringize_c_nvm
]
[ compile tuple.c
: <define>BOOST_PP_VARIADICS=0
: tuple_c_nvm
]
;
alias preprocessor_number_rep_512
:
[ compile repetition.cpp :
@@ -307,17 +182,6 @@ alias preprocessor_number_rep_512
]
;
alias preprocessor_number_nvm_rep_512
:
[ compile repetition.cpp :
<define>BOOST_PP_LIMIT_MAG=512
<define>BOOST_PP_LIMIT_REPEAT=512
<define>BOOST_PP_LIMIT_FOR=512
<define>BOOST_PP_VARIADICS=0
: repetition_nvm_rep_num_512
]
;
alias preprocessor_number_rep_1024
:
[ compile repetition.cpp :
@@ -328,17 +192,6 @@ alias preprocessor_number_rep_1024
]
;
alias preprocessor_number_nvm_rep_1024
:
[ compile repetition.cpp :
<define>BOOST_PP_LIMIT_MAG=1024
<define>BOOST_PP_LIMIT_REPEAT=1024
<define>BOOST_PP_LIMIT_FOR=1024
<define>BOOST_PP_VARIADICS=0
: repetition_nvm_rep_num_1024
]
;
alias preprocessor_isempty : :
<toolset>gcc
<toolset-gcc:version>3.4
@@ -358,16 +211,11 @@ alias preprocessor_isempty
:
[ compile isempty.cpp ]
[ compile checkempty.cpp ]
[ compile-fail isempty_variadic_standard_failure.cpp : <define>BOOST_PP_VARIADICS=1 ]
[ compile-fail isempty_variadic_standard_failure2.cpp : <define>BOOST_PP_VARIADICS=1 ]
[ compile-fail isempty_variadic_standard_failure.cpp ]
[ compile-fail isempty_variadic_standard_failure2.cpp ]
[ compile vaopt.cpp ]
;
alias preprocessor_isempty_nvm
:
[ compile isempty.cpp : <define>BOOST_PP_VARIADICS=0 : isempty_nvm ]
;
alias preprocessor_isempty_c
:
[ compile isempty.c
@@ -375,23 +223,15 @@ alias preprocessor_isempty_c
: isempty_c
]
[ compile-fail isempty_variadic_standard_failure.c
: <define>BOOST_PP_VARIADICS=1
:
: isempty_variadic_standard_failure_c
]
[ compile-fail isempty_variadic_standard_failure2.c
: <define>BOOST_PP_VARIADICS=1
:
: isempty_variadic_standard_failure2_c
]
;
alias preprocessor_isempty_c_nvm
:
[ compile isempty.c
: <define>BOOST_PP_VARIADICS=0
: isempty_c_nvm
]
;
alias preprocessor_config
:
[ run config_info.cpp ]
@@ -401,19 +241,13 @@ explicit preprocessor_number_512 ;
explicit preprocessor_number_1024 ;
explicit preprocessor_v_128 ;
explicit preprocessor_v_256 ;
explicit preprocessor_v_128_c ;
explicit preprocessor_v_256_c ;
explicit preprocessor_number_nvm_512 ;
explicit preprocessor_number_nvm_1024 ;
explicit preprocessor_number_rep_512 ;
explicit preprocessor_number_nvm_rep_512 ;
explicit preprocessor_number_rep_1024 ;
explicit preprocessor_number_nvm_rep_1024 ;
alias preprocessor_128 : preprocessor_v_128 preprocessor_v_128_c ;
alias preprocessor_256 : preprocessor_v_256 preprocessor_v_256_c ;
alias preprocessor_512 : preprocessor_number_512 preprocessor_number_nvm_512 preprocessor_number_rep_512 preprocessor_number_nvm_rep_512 ;
alias preprocessor_1024 : preprocessor_number_1024 preprocessor_number_nvm_1024 preprocessor_number_rep_1024 preprocessor_number_nvm_rep_1024 ;
alias preprocessor_128 : preprocessor_v_128 ;
alias preprocessor_256 : preprocessor_v_256 ;
alias preprocessor_512 : preprocessor_number_512 preprocessor_number_rep_512 ;
alias preprocessor_1024 : preprocessor_number_1024 preprocessor_number_rep_1024 ;
alias preprocessor_tup : preprocessor_128 preprocessor_256 ;
alias preprocessor_num : preprocessor_512 preprocessor_1024 ;
alias preprocessor_limits : preprocessor_tup preprocessor_num ;
-32
View File
@@ -21,11 +21,9 @@
# include <boost/preprocessor/seq/size.hpp>
# include <boost/preprocessor/tuple/elem.hpp>
# include <boost/preprocessor/tuple/size.hpp>
# if BOOST_PP_VARIADICS
# include <boost/preprocessor/variadic/size.hpp>
# include <boost/preprocessor/variadic/elem.hpp>
# include <boost/preprocessor/variadic/has_opt.hpp>
# endif
# define ARRAY_EMPTY (0, ())
# define ARRAY_ONE (1, ())
@@ -121,8 +119,6 @@ BEGIN BOOST_PP_ARRAY_ELEM(253, ARRAY_VERY_LARGE_256) == 253 END
// enum
# if BOOST_PP_VARIADICS
BEGIN BOOST_PP_VARIADIC_ELEM(2,BOOST_PP_ARRAY_ENUM(ARRAY)) == 2 END
BEGIN BOOST_PP_VARIADIC_ELEM(3,BOOST_PP_ARRAY_ENUM((5, (0, 1, 2, 3, 4)))) == 3 END
BEGIN BOOST_PP_VARIADIC_ELEM(31,BOOST_PP_ARRAY_ENUM(ARRAY_LARGE)) == 31 END
@@ -158,8 +154,6 @@ BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_ARRAY_ENUM(ARRAY_VERY_LARGE_256)) == 256 E
#endif
# endif
// to_list
BEGIN BOOST_PP_LIST_AT(BOOST_PP_ARRAY_TO_LIST(ARRAY), 1) == 1 END
@@ -207,8 +201,6 @@ BEGIN BOOST_PP_SEQ_ELEM(181,BOOST_PP_ARRAY_TO_SEQ(ARRAY_VERY_LARGE_256)) == 181
// to_tuple
# if BOOST_PP_VARIADICS
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_TUPLE_ELEM(0, BOOST_PP_ARRAY_TO_TUPLE(ARRAY_ONE))) == 1 END
BEGIN BOOST_PP_TUPLE_ELEM(2, BOOST_PP_ARRAY_TO_TUPLE(ARRAY)) == 2 END
BEGIN BOOST_PP_TUPLE_ELEM(1, BOOST_PP_ARRAY_TO_TUPLE((5, (0, 1, 2, 3, 4)))) == 1 END
@@ -229,30 +221,6 @@ BEGIN BOOST_PP_TUPLE_ELEM(181,BOOST_PP_ARRAY_TO_TUPLE(ARRAY_VERY_LARGE_256)) ==
#endif
# else
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_TUPLE_ELEM(1, 0, BOOST_PP_ARRAY_TO_TUPLE(ARRAY_ONE))) == 1 END
BEGIN BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_ARRAY_TO_TUPLE(ARRAY)) == 2 END
BEGIN BOOST_PP_TUPLE_ELEM(5, 1, BOOST_PP_ARRAY_TO_TUPLE((5, (0, 1, 2, 3, 4)))) == 1 END
BEGIN BOOST_PP_TUPLE_ELEM(33, 26, BOOST_PP_ARRAY_TO_TUPLE(ARRAY_LARGE)) == 26 END
BEGIN BOOST_PP_TUPLE_ELEM(64, 37, BOOST_PP_ARRAY_TO_TUPLE((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)))) == 37 END
#if BOOST_PP_LIMIT_TUPLE > 64
BEGIN BOOST_PP_TUPLE_ELEM(104,97,BOOST_PP_ARRAY_TO_TUPLE(ARRAY_LARGE_128)) == 97 END
BEGIN BOOST_PP_TUPLE_ELEM(128,123,BOOST_PP_ARRAY_TO_TUPLE(ARRAY_VERY_LARGE_128)) == 123 END
#endif
#if BOOST_PP_LIMIT_TUPLE > 128
BEGIN BOOST_PP_TUPLE_ELEM(142,53,BOOST_PP_ARRAY_TO_TUPLE(ARRAY_LARGE_256)) == 53 END
BEGIN BOOST_PP_TUPLE_ELEM(256,181,BOOST_PP_ARRAY_TO_TUPLE(ARRAY_VERY_LARGE_256)) == 181 END
#endif
# endif
// insert
BEGIN BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ARRAY_INSERT(ARRAY_ONE,0,63)) == 63 END
-1
View File
@@ -92,7 +92,6 @@ void print_macros()
PRINT_MACRO(BOOST_PP_CONFIG_ERRORS);
PRINT_MACRO(BOOST_PP_CONFIG_EXTENDED_LINE_INFO);
PRINT_MACRO(BOOST_PP_CONFIG_FLAGS());
PRINT_MACRO(BOOST_PP_VARIADICS);
PRINT_MACRO(BOOST_PP_VARIADICS_MSVC);
PRINT_MACRO(BOOST_PP_VARIADIC_HAS_OPT());
}
+2 -20
View File
@@ -121,17 +121,6 @@ int print_macro(const std::string name,const std::string expected, const std::st
return bret;
}
#if !BOOST_PP_VARIADICS
#define STRINGIZE(arg) # arg
#define PRINT_MACRO_RESULTS(X,exp) print_macro(std::string(# X), std::string(# exp), std::string(STRINGIZE(X)))
#define PRINT_MACRO(x) std::string(# x)
#define PRINT_EXPECTED(x) std::string(# x)
#define PRINT_EXPANSION(x) std::string(STRINGIZE(x))
#else
#define STRINGIZE(...) # __VA_ARGS__
#define PRINT_MACRO_RESULTS(X,...) print_macro(std::string(# X), std::string(# __VA_ARGS__), std::string(STRINGIZE(X)))
@@ -139,8 +128,6 @@ int print_macro(const std::string name,const std::string expected, const std::st
#define PRINT_EXPECTED(...) std::string(# __VA_ARGS__)
#define PRINT_EXPANSION(...) std::string(STRINGIZE(__VA_ARGS__))
#endif
#if __cplusplus > 201703L
int print_macros_common_c20()
@@ -405,7 +392,7 @@ bret += PRINT_MACRO_RESULTS(char p[] = join(x, y);,char p[] = "x ## y";);
}
#if BOOST_PP_VARIADICS && __cplusplus > 199711L
#if __cplusplus > 199711L
int print_macros_common_3()
{
@@ -514,12 +501,7 @@ int print_macros()
#define FTN_LIKE(a) ( a )
#define FTN_LIKE( a )( /* note the white space */ a /* other stuff on this line */ )
#if !BOOST_PP_VARIADICS
bret += print_macros_common_1();
bret += print_macros_common_4();
#elif __cplusplus <= 199711L
#if __cplusplus <= 199711L
bret += print_macros_common_2();
bret += print_macros_common_1();
-4
View File
@@ -30,8 +30,6 @@ BEGIN BOOST_PP_IDENTITY_N(36,10)(0,1,2,3,4,5,6,7,8,9) == 36 END
BEGIN BOOST_PP_CAT(BOOST_PP_INTERCEPT, 2) 1 == 1 END
#if BOOST_PP_VARIADICS
#define OVMAC_1(x) BOOST_PP_ADD(x,5)
#define OVMAC_2(x,y) BOOST_PP_ADD(x,y)
#define OVMAC_3(x,y,z) BOOST_PP_ADD(BOOST_PP_MUL(x,y),z)
@@ -51,5 +49,3 @@ BEGIN OVTEST(3,4,5) == 17 END
BEGIN OVTEST(9,3,2,7) == 41 END
BEGIN OVTEST(8) == 13 END
BEGIN OVTEST(24,61) == 85 END
#endif
-57
View File
@@ -36,8 +36,6 @@
#define ATUPLE (atuple)
#define ATUPLE_PLUS (atuple) data
#if BOOST_PP_VARIADICS
# include <boost/preprocessor/variadic/has_opt.hpp>
#if defined(__cplusplus) && __cplusplus > 201703L && BOOST_PP_VARIADIC_HAS_OPT()
@@ -100,59 +98,4 @@ BEGIN BOOST_PP_IS_EMPTY(NAME) == 0 END
BEGIN BOOST_PP_IS_EMPTY(ATUPLE) == 0 END
BEGIN BOOST_PP_IS_EMPTY(ATUPLE_PLUS) == 0 END
#else
#if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() /* Testing the VC++ non-variadic version */
/* INCORRECT */
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN) == 1 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN2) == 1 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN3) == 1 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN4) == 1 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN5) == 1 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN8) == 1 END
BEGIN BOOST_PP_IS_EMPTY(ATUPLE) == 1 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN10) == 1 END
BEGIN BOOST_PP_IS_EMPTY(ATUPLE_PLUS) == 1 END
/* CORRECT */
BEGIN BOOST_PP_IS_EMPTY(NAME) == 0 END
#else /* Testing the non-VC++ non-variadic version */
/* CORRECT */
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN2) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN3) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN4) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN5) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN8) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN10) == 0 END
/* UNDEFINED BEHAVIOR */
// BEGIN BOOST_PP_IS_EMPTY(ATUPLE) == 0 END
// BEGIN BOOST_PP_IS_EMPTY(ATUPLE_PLUS) == 1 END
// BEGIN BOOST_PP_IS_EMPTY(NAME) == 0 END
#endif
/* Testing the non-variadic version */
/* CORRECT */
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_EMPTY()) == 1 END
BEGIN BOOST_PP_IS_EMPTY(DATA BOOST_PP_EMPTY()) == 1 END
BEGIN BOOST_PP_IS_EMPTY(x BOOST_PP_EMPTY()) == 0 END
BEGIN BOOST_PP_IS_EMPTY(OBJECT BOOST_PP_EMPTY()) == 1 END
BEGIN BOOST_PP_IS_EMPTY(FUNC(z) BOOST_PP_EMPTY()) == 1 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN6) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN7) == 0 END
BEGIN BOOST_PP_IS_EMPTY(FUNC_GEN9) == 0 END
#endif
#endif
+1 -1
View File
@@ -12,7 +12,7 @@
# include <boost/preprocessor/facilities/is_empty.hpp>
# include <libs/preprocessor/test/test.h>
#if BOOST_PP_VARIADICS && (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) && !BOOST_PP_VARIADICS_MSVC
#if (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) && !BOOST_PP_VARIADICS_MSVC
#define FUNC_GEN8(x,y) (1,2,3)
+1 -1
View File
@@ -12,7 +12,7 @@
# include <boost/preprocessor/facilities/is_empty.hpp>
# include <libs/preprocessor/test/test.h>
#if BOOST_PP_VARIADICS && (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) && !BOOST_PP_VARIADICS_MSVC
#if (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()) && !BOOST_PP_VARIADICS_MSVC
#define FUNC_GEN9(x,y,z) anything
-11
View File
@@ -319,12 +319,7 @@ BEGIN BOOST_PP_LIST_IS_NIL(LIST_1024) == 0 END
#endif
#if BOOST_PP_VARIADICS
BEGIN BOOST_PP_VARIADIC_ELEM(2,BOOST_PP_LIST_ENUM(LIST)) == 5 END
#endif
BEGIN BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_SUB_D, 22, LIST) == 10 END
BEGIN BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_SUB_D, 22, LISTNIL) == 22 END
BEGIN BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_ADD_D, 0, LIST) == 12 END
@@ -443,13 +438,7 @@ BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_LIST_FILTER(BOOST_PP_EQUAL_D, 923, LIST_1024))
#endif
BEGIN BOOST_PP_LIST_FOR_EACH_PRODUCT(F2, 2, ( (1, (0, BOOST_PP_NIL)), (2, (3, BOOST_PP_NIL)) )) == 0 END
# if BOOST_PP_VARIADICS
BEGIN BOOST_PP_LIST_FOR_EACH_PRODUCT(F2, ( (1, (0, BOOST_PP_NIL)), (2, (3, BOOST_PP_NIL)) )) == 0 END
#endif
BEGIN BOOST_PP_LIST_CAT(BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_APPEND_D, BOOST_PP_NIL, LL)) == 0x0a1b2c3d END
BEGIN BOOST_PP_ARRAY_ELEM(2, BOOST_PP_LIST_TO_ARRAY(LIST)) == 5 END
-4
View File
@@ -9,7 +9,6 @@
#
# /* See http://www.boost.org for most recent version. */
#
# if BOOST_PP_VARIADICS
# include <boost/preprocessor/punctuation.hpp>
# include <libs/preprocessor/test/test.h>
@@ -28,7 +27,6 @@
# define DATA3 4 * (5 + 3) * (2 + 1)
# define DATA4 (5 + 3) * (2 + 1) * 4
// is_begin_parens
BEGIN BOOST_PP_IS_BEGIN_PARENS() == 0 END
@@ -50,5 +48,3 @@ BEGIN BOOST_PP_REMOVE_PARENS(DATA) == 17 END
BEGIN BOOST_PP_REMOVE_PARENS(DATA2)== 32 END
BEGIN BOOST_PP_REMOVE_PARENS(DATA3)== 96 END
BEGIN BOOST_PP_REMOVE_PARENS(DATA4)== 41 END
#endif
-10
View File
@@ -416,13 +416,7 @@ BEGIN BOOST_PP_SEQ_FOR_EACH_I(FE1024, 2, SEQ_1024) == 9 END
BEGIN BOOST_PP_TUPLE_ELEM(4, 3, BOOST_PP_SEQ_TO_TUPLE(SEQ)) == 2 END
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_TUPLE_ELEM(1, 0, BOOST_PP_SEQ_TO_TUPLE(SEQ_NONE))) == 1 END
#if BOOST_PP_VARIADICS
BEGIN BOOST_PP_TUPLE_SIZE(BOOST_PP_SEQ_TO_TUPLE(SEQ_NONE)) == 1 END
#endif
BEGIN BOOST_PP_ARRAY_ELEM(3, BOOST_PP_SEQ_TO_ARRAY(SEQ)) == 2 END
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_ARRAY_ELEM(0, BOOST_PP_SEQ_TO_ARRAY(SEQ_NONE))) == 1 END
@@ -648,8 +642,6 @@ BEGIN BOOST_PP_LIST_AT(BOOST_PP_SEQ_TO_LIST(SEQ), 2) == 5 END
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_LIST_AT(BOOST_PP_SEQ_TO_LIST(SEQ_NONE),0)) == 1 END
BEGIN BOOST_PP_LIST_SIZE(BOOST_PP_SEQ_TO_LIST(SEQ_NONE)) == 1 END
#if BOOST_PP_VARIADICS
# if BOOST_PP_VARIADIC_HAS_OPT()
BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_SEQ_ENUM(SEQ_NONE)) == 0 END
@@ -662,5 +654,3 @@ BEGIN BOOST_PP_VARIADIC_SIZE(BOOST_PP_SEQ_ENUM(SEQ_NONE)) == 1 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
#endif
-2
View File
@@ -32,7 +32,5 @@ BEGIN sizeof(BOOST_PP_STRINGIZE(FDATA(9))) / sizeof(char) == 3 END
BEGIN sizeof(BOOST_PP_WSTRINGIZE(DATA)) / sizeof(wchar_t) == 5 END
BEGIN sizeof(BOOST_PP_WSTRINGIZE(FDATA(1))) / sizeof(wchar_t) == 2 END
BEGIN sizeof(BOOST_PP_WSTRINGIZE(FDATA(9))) / sizeof(wchar_t) == 3 END
#if BOOST_PP_VARIADICS
BEGIN sizeof(BOOST_PP_STRINGIZE(VDATA)) / sizeof(char) == 8 END
BEGIN sizeof(BOOST_PP_WSTRINGIZE(VDATA)) / sizeof(wchar_t) == 8 END
#endif
-52
View File
@@ -22,11 +22,9 @@
# include <boost/preprocessor/seq/elem.hpp>
# include <boost/preprocessor/seq/size.hpp>
# include <boost/preprocessor/facilities/is_empty.hpp>
# if BOOST_PP_VARIADICS
# include <boost/preprocessor/variadic/size.hpp>
# include <boost/preprocessor/variadic/elem.hpp>
# include <boost/preprocessor/variadic/has_opt.hpp>
# endif
# include <libs/preprocessor/test/test.h>
# include <libs/preprocessor/test/tuple_elem_bug_test.cxx>
@@ -69,8 +67,6 @@
#endif
#if BOOST_PP_VARIADICS
# define CALC(x) BOOST_PP_TUPLE_ELEM(0, x) BOOST_PP_TUPLE_ELEM(1, x) BOOST_PP_TUPLE_ELEM(2, x)
# define TEST_EAT BOOST_PP_TUPLE_EAT()(1, 2) 4
# define TEST_EAT_NONE BOOST_PP_TUPLE_EAT()() 17
@@ -112,50 +108,6 @@
#endif
#else
# define CALC(x) BOOST_PP_TUPLE_ELEM(3, 0, x) BOOST_PP_TUPLE_ELEM(3, 1, x) BOOST_PP_TUPLE_ELEM(3, 2, x)
# define TEST_EAT BOOST_PP_TUPLE_EAT(2)(1, 2) 4
# define TEST_EAT_NONE BOOST_PP_TUPLE_EAT(1)() 17
# define TEST_EAT_LARGE BOOST_PP_TUPLE_EAT(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) 6
# define TEST_EAT_VERY_LARGE BOOST_PP_TUPLE_EAT(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) 8
#if BOOST_PP_LIMIT_TUPLE > 64
# define TEST_EAT_LARGE_128 \
BOOST_PP_TUPLE_EAT(100) \
( 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, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ) \
113
# define TEST_EAT_VERY_LARGE_128 \
BOOST_PP_TUPLE_EAT(128) \
( 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, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127 ) \
123
#endif
#if BOOST_PP_LIMIT_TUPLE > 128
# define TEST_EAT_LARGE_256 \
BOOST_PP_TUPLE_EAT(135) \
( 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, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, \
128, 129, 130, 131, 132, 133, 134 ) \
75
# define TEST_EAT_VERY_LARGE_256 \
BOOST_PP_TUPLE_EAT(256) \
( 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, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, \
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, \
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 ) \
224
#endif
#endif
// elem
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_TUPLE_ELEM(1, 0, TUPLE_NONE)) == 1 END
@@ -300,8 +252,6 @@ BEGIN BOOST_PP_SEQ_ELEM(181,BOOST_PP_TUPLE_TO_SEQ(256,TUPLE_VERY_LARGE_256)) ==
#endif
#if BOOST_PP_VARIADICS
// elem
BEGIN BOOST_PP_IS_EMPTY(BOOST_PP_TUPLE_ELEM(0, TUPLE_NONE)) == 1 END
@@ -745,5 +695,3 @@ BEGIN BOOST_PP_SEQ_ELEM(53,BOOST_PP_TUPLE_TO_SEQ(TUPLE_LARGE_256)) == 53 END
BEGIN BOOST_PP_SEQ_ELEM(181,BOOST_PP_TUPLE_TO_SEQ(TUPLE_VERY_LARGE_256)) == 181 END
#endif
#endif
-4
View File
@@ -21,8 +21,6 @@
# include <boost/preprocessor/tuple/elem.hpp>
# include <libs/preprocessor/test/test.h>
#if BOOST_PP_VARIADICS
#define VDATA 0,1,2,3,4,5,6
#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
@@ -163,5 +161,3 @@ BEGIN BOOST_PP_TUPLE_ELEM(133,BOOST_PP_VARIADIC_TO_TUPLE(VDATA_LARGE_256)) == 13
#endif
#endif
#endif