[SVN r12692]
This commit is contained in:
Vesa Karvonen
2002-02-04 15:00:30 +00:00
parent cda5e36015
commit 00d4dc6155
9 changed files with 273 additions and 7 deletions

View File

@ -63,6 +63,7 @@ BOOST_PP_STRINGIZE
BOOST_PP_SUB BOOST_PP_SUB
BOOST_PP_TUPLE_EAT BOOST_PP_TUPLE_EAT
BOOST_PP_TUPLE_ELEM BOOST_PP_TUPLE_ELEM
BOOST_PP_TUPLE_REVERSE
BOOST_PP_TUPLE_TO_LIST BOOST_PP_TUPLE_TO_LIST
BOOST_PP_WHILE BOOST_PP_WHILE
BOOST_PP_XOR BOOST_PP_XOR

View File

@ -0,0 +1,42 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../../boost.css">
<title>Boost.Preprocessor</title>
</head>
<body bgcolor="#FFFFFF" link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Preprocessor</h1>
<h2 align="center">Reference</h2>
</td>
</tr>
</table>
<hr>
<a href="while.htm">Prev</a> <a href="arithmetic_add.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<h1>#include &lt;<a href="../../../../boost/preprocessor/arithmetic.hpp">boost/preprocessor/arithmetic.hpp</a>&gt;</h1>
<p>Includes all arithmetic headers.</p>
<hr>
<a href="while.htm">Prev</a> <a href="arithmetic_add.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
<p><i>&copy; Copyright <a href="http://www.housemarque.com">Housemarque Oy</a> 2002</i></p>
<p><i>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.</i></p>
</body></html>

View File

@ -0,0 +1,42 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../../boost.css">
<title>Boost.Preprocessor</title>
</head>
<body bgcolor="#FFFFFF" link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Preprocessor</h1>
<h2 align="center">Reference</h2>
</td>
</tr>
</table>
<hr>
<a href="comma_if.htm">Prev</a> <a href="comparison_equal.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<h1>#include &lt;<a href="../../../../boost/preprocessor/comparison.hpp">boost/preprocessor/comparison.hpp</a>&gt;</h1>
<p>Includes all comparison headers.</p>
<hr>
<a href="comma_if.htm">Prev</a> <a href="comparison_equal.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
<p><i>&copy; Copyright <a href="http://www.housemarque.com">Housemarque Oy</a> 2002</i></p>
<p><i>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.</i></p>
</body></html>

42
doc/reference/list.htm Normal file
View File

@ -0,0 +1,42 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../../boost.css">
<title>Boost.Preprocessor</title>
</head>
<body bgcolor="#FFFFFF" link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Preprocessor</h1>
<h2 align="center">Reference</h2>
</td>
</tr>
</table>
<hr>
<a href="limits.htm">Prev</a> <a href="list_adt.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<h1>#include &lt;<a href="../../../../boost/preprocessor/list.hpp">boost/preprocessor/list.hpp</a>&gt;</h1>
<p>Includes all list headers.</p>
<hr>
<a href="limits.htm">Prev</a> <a href="list_adt.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
<p><i>&copy; Copyright <a href="http://www.housemarque.com">Housemarque Oy</a> 2002</i></p>
<p><i>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.</i></p>
</body></html>

42
doc/reference/logical.htm Normal file
View File

@ -0,0 +1,42 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../../boost.css">
<title>Boost.Preprocessor</title>
</head>
<body bgcolor="#FFFFFF" link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Preprocessor</h1>
<h2 align="center">Reference</h2>
</td>
</tr>
</table>
<hr>
<a href="list_transform.htm">Prev</a> <a href="logical_and.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<h1>#include &lt;<a href="../../../../boost/preprocessor/logical.hpp">boost/preprocessor/logical.hpp</a>&gt;</h1>
<p>Includes all logical headers.</p>
<hr>
<a href="list_transform.htm">Prev</a> <a href="logical_and.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
<p><i>&copy; Copyright <a href="http://www.housemarque.com">Housemarque Oy</a> 2002</i></p>
<p><i>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.</i></p>
</body></html>

42
doc/reference/tuple.htm Normal file
View File

@ -0,0 +1,42 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../../boost.css">
<title>Boost.Preprocessor</title>
</head>
<body bgcolor="#FFFFFF" link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Preprocessor</h1>
<h2 align="center">Reference</h2>
</td>
</tr>
</table>
<hr>
<a href="stringize.htm">Prev</a> <a href="tuple_eat.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<h1>#include &lt;<a href="../../../../boost/preprocessor/tuple.hpp">boost/preprocessor/tuple.hpp</a>&gt;</h1>
<p>Includes all tuple headers.</p>
<hr>
<a href="stringize.htm">Prev</a> <a href="tuple_eat.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
<p><i>&copy; Copyright <a href="http://www.housemarque.com">Housemarque Oy</a> 2002</i></p>
<p><i>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.</i></p>
</body></html>

View File

@ -0,0 +1,55 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../../boost.css">
<title>Boost.Preprocessor</title>
</head>
<body bgcolor="#FFFFFF" link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
"header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
</td>
<td valign="top">
<h1 align="center">Boost.Preprocessor</h1>
<h2 align="center">Reference</h2>
</td>
</tr>
</table>
<hr>
<a href="tuple_elem.htm">Prev</a> <a href="tuple_to_list.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<h1>#include &lt;<a href="../../../../boost/preprocessor/tuple/reverse.hpp">boost/preprocessor/tuple/reverse.hpp</a>&gt;</h1>
<hr>
<h2><a name="BOOST_PP_TUPLE_REVERSE">#define BOOST_PP_TUPLE_REVERSE</a>(N,T)</h2>
<p>Tuple reversal.</p>
<p>For example,</p>
<pre>
<a href="tuple_reverse.htm#BOOST_PP_TUPLE_REVERSE">BOOST_PP_TUPLE_REVERSE</a>(3,(A,B,C))
</pre>
<p>expands to <code>(C,B,A)</code>.</p>
<hr>
<a href="tuple_elem.htm">Prev</a> <a href="tuple_to_list.htm">Next</a> <a href="index.htm#Macros">Macros</a> <a href="index.htm#Headers">Headers</a>
<hr>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
<p><i>&copy; Copyright <a href="http://www.housemarque.com">Housemarque Oy</a> 2002</i></p>
<p><i>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.</i></p>
</body></html>

View File

@ -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) #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. */ /* 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_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)\ #define UNARY_ARRAY_OP3(O,T)\
void BOOST_PP_LIST_CAT(BOOST_PP_TUPLE_TO_LIST(4,(array_,OP_NAME(O),_,TYPE_ABBREVIATION(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);\ } 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. */ /* 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_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)\ #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))))\ 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);\ } 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))

View File

@ -29,10 +29,10 @@
template<class T> struct is_integral {enum {value = false};}; template<class T> struct is_integral {enum {value = false};};
/* Macro for defining a specialization of is_integral<> template. */ /* Macro for defining a specialization of is_integral<> template. */
#define IS_INTEGRAL_SPECIALIZATION(R,_,L)\ #define IS_INTEGRAL_SPECIALIZATION(R,L)\
template<> struct is_integral<BOOST_PP_LIST_AT(L,1)() BOOST_PP_LIST_AT(L,0)> {enum {value = true};}; template<> struct is_integral<BOOST_PP_TUPLE_ELEM(2,0,L)() BOOST_PP_TUPLE_ELEM(2,1,L)> {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 IS_INTEGRAL_SPECIALIZATION
#undef CV_QUALIFIERS #undef CV_QUALIFIERS
#undef INTEGRAL_TYPES #undef INTEGRAL_TYPES