From 00d4dc615535e34d904df55f0e252a3858640291 Mon Sep 17 00:00:00 2001 From: Vesa Karvonen Date: Mon, 4 Feb 2002 15:00:30 +0000 Subject: [PATCH] Updated [SVN r12692] --- doc/keywords.txt | 1 + doc/reference/arithmetic.htm | 42 +++++++++++++++++++++++++ doc/reference/comparison.htm | 42 +++++++++++++++++++++++++ doc/reference/list.htm | 42 +++++++++++++++++++++++++ doc/reference/logical.htm | 42 +++++++++++++++++++++++++ doc/reference/tuple.htm | 42 +++++++++++++++++++++++++ doc/reference/tuple_reverse.htm | 55 +++++++++++++++++++++++++++++++++ example/array_arithmetic.c | 8 ++--- example/is_integral.cpp | 6 ++-- 9 files changed, 273 insertions(+), 7 deletions(-) create mode 100644 doc/reference/arithmetic.htm create mode 100644 doc/reference/comparison.htm create mode 100644 doc/reference/list.htm create mode 100644 doc/reference/logical.htm create mode 100644 doc/reference/tuple.htm create mode 100644 doc/reference/tuple_reverse.htm 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 + + + + + + + +
+

C++ Boost

+
+

Boost.Preprocessor

+

Reference

+
+ +
+ +Prev Next Macros Headers +
+ +

#include <boost/preprocessor/arithmetic.hpp>

+

Includes all arithmetic headers.

+
+ +Prev Next Macros 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 + + + + + + + +
+

C++ Boost

+
+

Boost.Preprocessor

+

Reference

+
+ +
+ +Prev Next Macros Headers +
+ +

#include <boost/preprocessor/comparison.hpp>

+

Includes all comparison headers.

+
+ +Prev Next Macros 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 + + + + + + + +
+

C++ Boost

+
+

Boost.Preprocessor

+

Reference

+
+ +
+ +Prev Next Macros Headers +
+ +

#include <boost/preprocessor/list.hpp>

+

Includes all list headers.

+
+ +Prev Next Macros 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 + + + + + + + +
+

C++ Boost

+
+

Boost.Preprocessor

+

Reference

+
+ +
+ +Prev Next Macros Headers +
+ +

#include <boost/preprocessor/logical.hpp>

+

Includes all logical headers.

+
+ +Prev Next Macros 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 + + + + + + + +
+

C++ Boost

+
+

Boost.Preprocessor

+

Reference

+
+ +
+ +Prev Next Macros Headers +
+ +

#include <boost/preprocessor/tuple.hpp>

+

Includes all tuple headers.

+
+ +Prev Next Macros 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 + + + + + + + +
+

C++ Boost

+
+

Boost.Preprocessor

+

Reference

+
+ +
+ +Prev Next Macros Headers +
+ +

#include <boost/preprocessor/tuple/reverse.hpp>

+ +
+ +

#define BOOST_PP_TUPLE_REVERSE(N,T)

+

Tuple reversal.

+ +

For example,

+ +
+  BOOST_PP_TUPLE_REVERSE(3,(A,B,C))
+
+ +

expands to (C,B,A).

+ +
+ +Prev Next Macros 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/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 struct is_integral {enum {value = false};}; /* Macro for defining a specialization of is_integral<> template. */ -#define IS_INTEGRAL_SPECIALIZATION(R,_,L)\ - template<> struct is_integral {enum {value = true};}; +#define IS_INTEGRAL_SPECIALIZATION(R,L)\ + template<> struct is_integral {enum {value = true};}; -BOOST_PP_LIST_FOR_EACH_PRODUCT(IS_INTEGRAL_SPECIALIZATION,_,BOOST_PP_TUPLE_TO_LIST(2,(CV_QUALIFIERS, INTEGRAL_TYPES))) +BOOST_PP_LIST_FOR_EACH_PRODUCT(IS_INTEGRAL_SPECIALIZATION,2,(CV_QUALIFIERS, INTEGRAL_TYPES)) #undef IS_INTEGRAL_SPECIALIZATION #undef CV_QUALIFIERS #undef INTEGRAL_TYPES