diff --git a/doc/keywords.txt b/doc/keywords.txt index 384c424..e6dd788 100644 --- a/doc/keywords.txt +++ b/doc/keywords.txt @@ -63,6 +63,7 @@ BOOST_PP_STRINGIZE BOOST_PP_SUB BOOST_PP_TUPLE_EAT BOOST_PP_TUPLE_ELEM +BOOST_PP_TUPLE_REVERSE BOOST_PP_TUPLE_TO_LIST BOOST_PP_WHILE BOOST_PP_XOR diff --git a/doc/reference/arithmetic.htm b/doc/reference/arithmetic.htm new file mode 100644 index 0000000..1d77648 --- /dev/null +++ b/doc/reference/arithmetic.htm @@ -0,0 +1,42 @@ + +
+ + +
+ |
+
+ Boost.Preprocessor+Reference+ |
+
Includes all arithmetic headers.
+Revised
+ +© Copyright Housemarque Oy 2002
+ +Permission to copy, use, modify, sell and distribute this document is granted +provided this copyright notice appears in all copies. This document is provided +"as is" without express or implied warranty, and with no claim as to its suitability +for any purpose.
+ + diff --git a/doc/reference/comparison.htm b/doc/reference/comparison.htm new file mode 100644 index 0000000..bc6d987 --- /dev/null +++ b/doc/reference/comparison.htm @@ -0,0 +1,42 @@ + + + + +
+ |
+
+ Boost.Preprocessor+Reference+ |
+
Includes all comparison headers.
+Revised
+ +© Copyright Housemarque Oy 2002
+ +Permission to copy, use, modify, sell and distribute this document is granted +provided this copyright notice appears in all copies. This document is provided +"as is" without express or implied warranty, and with no claim as to its suitability +for any purpose.
+ + diff --git a/doc/reference/list.htm b/doc/reference/list.htm new file mode 100644 index 0000000..c2a6e5f --- /dev/null +++ b/doc/reference/list.htm @@ -0,0 +1,42 @@ + + + + +
+ |
+
+ Boost.Preprocessor+Reference+ |
+
Includes all list headers.
+Revised
+ +© Copyright Housemarque Oy 2002
+ +Permission to copy, use, modify, sell and distribute this document is granted +provided this copyright notice appears in all copies. This document is provided +"as is" without express or implied warranty, and with no claim as to its suitability +for any purpose.
+ + diff --git a/doc/reference/logical.htm b/doc/reference/logical.htm new file mode 100644 index 0000000..f1c584e --- /dev/null +++ b/doc/reference/logical.htm @@ -0,0 +1,42 @@ + + + + +
+ |
+
+ Boost.Preprocessor+Reference+ |
+
Includes all logical headers.
+Revised
+ +© Copyright Housemarque Oy 2002
+ +Permission to copy, use, modify, sell and distribute this document is granted +provided this copyright notice appears in all copies. This document is provided +"as is" without express or implied warranty, and with no claim as to its suitability +for any purpose.
+ + diff --git a/doc/reference/tuple.htm b/doc/reference/tuple.htm new file mode 100644 index 0000000..23d2a1b --- /dev/null +++ b/doc/reference/tuple.htm @@ -0,0 +1,42 @@ + + + + +
+ |
+
+ Boost.Preprocessor+Reference+ |
+
Includes all tuple headers.
+Revised
+ +© Copyright Housemarque Oy 2002
+ +Permission to copy, use, modify, sell and distribute this document is granted +provided this copyright notice appears in all copies. This document is provided +"as is" without express or implied warranty, and with no claim as to its suitability +for any purpose.
+ + diff --git a/doc/reference/tuple_reverse.htm b/doc/reference/tuple_reverse.htm new file mode 100644 index 0000000..a1a628a --- /dev/null +++ b/doc/reference/tuple_reverse.htm @@ -0,0 +1,55 @@ + + + + +
+ |
+
+ Boost.Preprocessor+Reference+ |
+
Tuple reversal.
+ +For example,
+ ++ BOOST_PP_TUPLE_REVERSE(3,(A,B,C)) ++ +
expands to (C,B,A)
.
Revised
+ +© Copyright Housemarque Oy 2002
+ +Permission to copy, use, modify, sell and distribute this document is granted +provided this copyright notice appears in all copies. This document is provided +"as is" without express or implied warranty, and with no claim as to its suitability +for any purpose.
+ + diff --git a/example/array_arithmetic.c b/example/array_arithmetic.c index 60559d4..6c0ceb0 100644 --- a/example/array_arithmetic.c +++ b/example/array_arithmetic.c @@ -118,7 +118,7 @@ #define IS_VALID_BINARY_OP_AND_TYPE_COMBINATION(O,L,R) BOOST_PP_IF(BOOST_PP_OR(TYPE_IS_FLOATING(L),TYPE_IS_FLOATING(R)),OP_IS_FLOATING(O),1) /* Generates code for all all unary operators and integral types. */ -#define UNARY_ARRAY_OP(R,_,L) UNARY_ARRAY_OP2(BOOST_PP_LIST_AT(L,1),BOOST_PP_LIST_FIRST(L)) +#define UNARY_ARRAY_OP(R,L) UNARY_ARRAY_OP2(BOOST_PP_TUPLE_ELEM(2,0,L),BOOST_PP_TUPLE_ELEM(2,1,L)) #define UNARY_ARRAY_OP2(O,T) BOOST_PP_IF(IS_VALID_UNARY_OP_AND_TYPE_COMBINATION(O,T),UNARY_ARRAY_OP3,BOOST_PP_TUPLE2_EAT)(O,T) #define UNARY_ARRAY_OP3(O,T)\ void BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(4,(array_,OP_NAME(O),_,TYPE_ABBREVIATION(T))))\ @@ -131,10 +131,10 @@ } while (--n);\ } -BOOST_PP_LIST_FOR_EACH_PRODUCT(UNARY_ARRAY_OP,_,BOOST_PP_TUPLE_TO_LIST(2,(APPLICATIVE_UNARY_OPS,BUILTIN_TYPES))) +BOOST_PP_LIST_FOR_EACH_PRODUCT(UNARY_ARRAY_OP,2,(APPLICATIVE_UNARY_OPS,BUILTIN_TYPES)) /* Generates code for all binary operators and integral type pairs. */ -#define BINARY_ARRAY_OP(R,_,L) BINARY_ARRAY_OP2(BOOST_PP_LIST_AT(L,2),BOOST_PP_LIST_AT(L,1),BOOST_PP_LIST_FIRST(L)) +#define BINARY_ARRAY_OP(R,L) BINARY_ARRAY_OP2(BOOST_PP_TUPLE_ELEM(3,0,L),BOOST_PP_TUPLE_ELEM(3,1,L),BOOST_PP_TUPLE_ELEM(3,2,L)) #define BINARY_ARRAY_OP2(O,L,R) BOOST_PP_IF(IS_VALID_BINARY_OP_AND_TYPE_COMBINATION(O,L,R),BINARY_ARRAY_OP3,BOOST_PP_TUPLE3_EAT)(O,L,R) #define BINARY_ARRAY_OP3(O,L,R)\ void BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(6,(array_,OP_NAME(O),_,TYPE_ABBREVIATION(L),_,TYPE_ABBREVIATION(R))))\ @@ -150,4 +150,4 @@ BOOST_PP_LIST_FOR_EACH_PRODUCT(UNARY_ARRAY_OP,_,BOOST_PP_TUPLE_TO_LIST(2,(APPLIC } while (--n);\ } -BOOST_PP_LIST_FOR_EACH_PRODUCT(BINARY_ARRAY_OP,_,BOOST_PP_TUPLE_TO_LIST(3,(APPLICATIVE_BINARY_OPS,BUILTIN_TYPES,BUILTIN_TYPES))) +BOOST_PP_LIST_FOR_EACH_PRODUCT(BINARY_ARRAY_OP,3,(APPLICATIVE_BINARY_OPS,BUILTIN_TYPES,BUILTIN_TYPES)) diff --git a/example/is_integral.cpp b/example/is_integral.cpp index e1d2800..95541df 100644 --- a/example/is_integral.cpp +++ b/example/is_integral.cpp @@ -29,10 +29,10 @@ template