2001-11-25 18:32:11 +00:00
|
|
|
|
<a href="../index.htm"><IMG height=86
|
|
|
|
|
alt="c++boost.gif (8819 bytes)"
|
|
|
|
|
src="../../../../c++boost.gif"
|
|
|
|
|
width=277 align=center></a>
|
|
|
|
|
<hr>
|
2002-01-25 13:14:30 +00:00
|
|
|
|
<!-- Generated by Doxygen -->
|
2001-11-25 18:32:11 +00:00
|
|
|
|
<center>
|
|
|
|
|
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="globals.html">File Members</a> </center>
|
2002-01-29 14:13:10 +00:00
|
|
|
|
<hr><h1>empty.hpp File Reference</h1><a href="../../../../boost/preprocessor/empty.hpp">Click here to see the header.</a>.
|
|
|
|
|
<a href="#_details">More...</a>
|
|
|
|
|
<p>
|
|
|
|
|
<table border=0 cellpadding=0 cellspacing=0>
|
2001-11-25 18:32:11 +00:00
|
|
|
|
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
|
2001-12-28 11:06:53 +00:00
|
|
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="empty_8hpp.html#a0">BOOST_PP_EMPTY</a>()</td></tr>
|
2002-01-29 14:13:10 +00:00
|
|
|
|
<tr><td> </td><td><font size=-1><em>Expands to nothing.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
|
2001-12-28 11:06:53 +00:00
|
|
|
|
<tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="empty_8hpp.html#a1">BOOST_PREPROCESSOR_EMPTY</a>()</td></tr>
|
2002-01-29 14:13:10 +00:00
|
|
|
|
<tr><td> </td><td><font size=-1><em>Obsolete.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
|
2001-11-25 18:32:11 +00:00
|
|
|
|
</table>
|
|
|
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
2002-01-29 14:13:10 +00:00
|
|
|
|
<a href="../../../../boost/preprocessor/empty.hpp">Click here to see the header.</a>.
|
|
|
|
|
<p>
|
|
|
|
|
|
2001-11-25 18:32:11 +00:00
|
|
|
|
<p>
|
|
|
|
|
<hr><h2>Define Documentation</h2>
|
2001-12-28 11:06:53 +00:00
|
|
|
|
<a name="a0" doxytag="empty.hpp::BOOST_PP_EMPTY"></a><p>
|
2001-11-25 18:32:11 +00:00
|
|
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="md">
|
|
|
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
|
|
|
<tr>
|
2001-12-28 11:06:53 +00:00
|
|
|
|
<td class="md" nowrap valign="top"> #define BOOST_PP_EMPTY</td>
|
2001-11-25 18:32:11 +00:00
|
|
|
|
<td class="md" valign="top">( </td>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="mdname1" valign="top" nowrap> </td>
|
|
|
|
|
<td class="md" valign="top">) </td>
|
|
|
|
|
<td class="md" nowrap>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<table cellspacing=5 cellpadding=0 border=0>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<p>
|
2002-01-29 14:13:10 +00:00
|
|
|
|
Expands to nothing.
|
|
|
|
|
<p>
|
|
|
|
|
Used with <a class="el" href="if_8hpp.html#a0">BOOST_PP_IF</a>() and as an unused parameter.
|
2001-11-25 18:32:11 +00:00
|
|
|
|
<p>
|
2001-12-28 11:06:53 +00:00
|
|
|
|
Example usage as the implementation of <a class="el" href="comma__if_8hpp.html#a0">BOOST_PP_COMMA_IF</a>(C):
|
2001-11-25 18:32:11 +00:00
|
|
|
|
<p>
|
|
|
|
|
<pre><div class="fragment"><pre>
|
2001-12-28 11:06:53 +00:00
|
|
|
|
#define BOOST_PP_COMMA_IF(C)\
|
|
|
|
|
BOOST_PP_IF(C,BOOST_PP_COMMA,BOOST_PP_EMPTY)()
|
2001-11-25 18:32:11 +00:00
|
|
|
|
</pre></div></pre>
|
|
|
|
|
<p>
|
|
|
|
|
Example usage as an unused macro parameter:
|
|
|
|
|
<p>
|
|
|
|
|
<pre><div class="fragment"><pre>
|
2001-12-28 11:06:53 +00:00
|
|
|
|
#define BOOST_PP_DEF(CV)\
|
2001-11-25 18:32:11 +00:00
|
|
|
|
template<class base> \
|
|
|
|
|
CV typename implement_subscript_using_begin_subscript<base>::value_type&\
|
|
|
|
|
implement_subscript_using_begin_subscript<base>::operator[]\
|
|
|
|
|
( index_type \
|
|
|
|
|
i \
|
|
|
|
|
) CV \
|
|
|
|
|
{ return base::begin()[i]; \
|
|
|
|
|
}
|
|
|
|
|
|
2001-12-28 11:06:53 +00:00
|
|
|
|
BOOST_PP_DEF(BOOST_PP_EMPTY())
|
|
|
|
|
BOOST_PP_DEF(const)
|
|
|
|
|
#undef BOOST_PP_DEF
|
2001-11-25 18:32:11 +00:00
|
|
|
|
</pre></div></pre>
|
|
|
|
|
<p>
|
|
|
|
|
The above expands to:
|
|
|
|
|
<p>
|
|
|
|
|
<pre><div class="fragment"><pre>
|
|
|
|
|
template<class base>
|
|
|
|
|
typename implement_subscript_using_begin_subscript<base>::value_type&
|
|
|
|
|
implement_subscript_using_begin_subscript<base>::operator[]
|
|
|
|
|
( index_type
|
|
|
|
|
i
|
|
|
|
|
)
|
|
|
|
|
{ return base::begin()[i];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template<class base>
|
|
|
|
|
const typename implement_subscript_using_begin_subscript<base>::value_type&
|
|
|
|
|
implement_subscript_using_begin_subscript<base>::operator[]
|
|
|
|
|
( index_type
|
|
|
|
|
i
|
|
|
|
|
) const
|
|
|
|
|
{ return base::begin()[i];
|
|
|
|
|
}
|
|
|
|
|
</pre></div></pre>
|
|
|
|
|
<p>
|
|
|
|
|
In case you wonder, the above code is part of a generalized layer for implementing the subscripting operators of a random access container. </td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2001-12-28 11:06:53 +00:00
|
|
|
|
<a name="a1" doxytag="empty.hpp::BOOST_PREPROCESSOR_EMPTY"></a><p>
|
|
|
|
|
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="md">
|
|
|
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="md" nowrap valign="top"> #define BOOST_PREPROCESSOR_EMPTY</td>
|
|
|
|
|
<td class="md" valign="top">( </td>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="mdname1" valign="top" nowrap> </td>
|
|
|
|
|
<td class="md" valign="top">) </td>
|
|
|
|
|
<td class="md" nowrap>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<table cellspacing=5 cellpadding=0 border=0>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<p>
|
2002-01-29 14:13:10 +00:00
|
|
|
|
Obsolete.
|
2001-12-28 11:06:53 +00:00
|
|
|
|
<p>
|
2002-01-29 14:13:10 +00:00
|
|
|
|
Use <a class="el" href="empty_8hpp.html#a0">BOOST_PP_EMPTY</a>(). </td>
|
2001-12-28 11:06:53 +00:00
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2001-11-25 18:32:11 +00:00
|
|
|
|
<hr>
|
2001-12-03 21:20:27 +00:00
|
|
|
|
<p><EFBFBD> Copyright Housemarque Oy 2001</p>
|
2001-11-25 18:32:11 +00:00
|
|
|
|
<p>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. </p>
|
|
|
|
|
|
|
|
|
|
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
|