Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/preprocessor/doc/ref/empty.html @ 12

Last change on this file since 12 was 12, checked in by landauf, 18 years ago

added boost

File size: 1.1 KB
Line 
1<html>
2<head>
3        <title>BOOST_PP_EMPTY</title>
4        <link rel="stylesheet" type="text/css" href="../styles.css">
5       
6</head>
7<body>
8        <div style="margin-left:  0px;">
9                The <b>BOOST_PP_EMPTY</b> macro is a nullary utility macro that expands to nothing.
10        </div>
11        <h4>Usage</h4>
12                <div class="code">
13                        <b>BOOST_PP_EMPTY</b>()
14                </div>
15        <h4>Remarks</h4>
16                <div>
17                        This macro is helps avoid inefficient macro-expansion.&nbsp;
18                        It is primarily useful as arguments to <b>BOOST_PP_IF</b> or <b>BOOST_PP_IIF</b>.
19                </div>
20        <h4>Requirements</h4>
21                <div>
22                        <b>Header:</b> &nbsp;<a href="../headers/facilities/empty.html">&lt;boost/preprocessor/facilities/empty.hpp&gt;</a>
23                </div>
24        <h4>Sample Code</h4>
25<div><pre>
26#include &lt;<a href="../headers/control/if.html">boost/preprocessor/control/if.hpp</a>&gt;
27#include &lt;<a href="../headers/facilities/empty.html">boost/preprocessor/facilities/empty.hpp</a>&gt;
28
29#define X() result
30#define MACRO(c) <a href="if.html">BOOST_PP_IF</a>(c, X, <a href="empty.html">BOOST_PP_EMPTY</a>)()
31
32MACRO(0) // expands to nothing
33MACRO(1) // expands to result
34</pre></div>
35</body>
36</html>
Note: See TracBrowser for help on using the repository browser.