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. |
---|
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> <a href="../headers/facilities/empty.html"><boost/preprocessor/facilities/empty.hpp></a> |
---|
23 | </div> |
---|
24 | <h4>Sample Code</h4> |
---|
25 | <div><pre> |
---|
26 | #include <<a href="../headers/control/if.html">boost/preprocessor/control/if.hpp</a>> |
---|
27 | #include <<a href="../headers/facilities/empty.html">boost/preprocessor/facilities/empty.hpp</a>> |
---|
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 | |
---|
32 | MACRO(0) // expands to nothing |
---|
33 | MACRO(1) // expands to result |
---|
34 | </pre></div> |
---|
35 | </body> |
---|
36 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.