Brian Silverman | f27e085 | 2018-08-04 23:56:45 -0700 | [diff] [blame^] | 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 | <hr size="1"> |
| 36 | <div style="margin-left: 0px;"> |
| 37 | <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i> |
| 38 | </br><i>© Copyright Paul Mensonides 2002</i> |
| 39 | </div> |
| 40 | <div style="margin-left: 0px;"> |
| 41 | <p><small>Distributed under the Boost Software License, Version 1.0. (See |
| 42 | accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or |
| 43 | copy at <a href= |
| 44 | "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> |
| 45 | </div> |
| 46 | </body> |
| 47 | </html> |