3 <title>BOOST_PP_IDENTITY
</title>
4 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
7 <div style=
"margin-left: 0px;">
8 The
<b>BOOST_PP_IDENTITY
</b> macro expands to its argument when invoked.
12 <b>BOOST_PP_IDENTITY
</b>(
<i>item
</i>)()
18 The result of the expansion.
23 This macro is designed to be used with
<b>BOOST_PP_IF
</b> and
<b>BOOST_PP_IIF
</b> when only one of the clauses needs to be invoked.
27 <li><a href=
"if.html">BOOST_PP_IF
</a></li>
28 <li><a href=
"iif.html">BOOST_PP_IIF
</a></li>
32 <b>Header:
</b> <a href=
"../headers/facilities/identity.html"><boost/preprocessor/facilities/identity.hpp
></a>
36 #include
<<a href=
"../headers/control/if.html">boost/preprocessor/control/if.hpp
</a>>
37 #include
<<a href=
"../headers/facilities/empty.html">boost/preprocessor/facilities/empty.hpp
</a>>
38 #include
<<a href=
"../headers/facilities/identity.html">boost/preprocessor/facilities/identity.hpp
</a>>
40 #define MACRO(n)
<a href=
"if.html">BOOST_PP_IF
</a>(n,
<a href=
"identity.html">BOOST_PP_IDENTITY
</a>(x),
<a href=
"empty.html">BOOST_PP_EMPTY
</a>)()
42 MACRO(
0) // expands to nothing
43 MACRO(
1) // expands to x
46 <div style=
"margin-left: 0px;">
47 <i>© Copyright
<a href=
"http://www.housemarque.com" target=
"_top">Housemarque Oy
</a> 2002</i>
48 </br><i>© Copyright Paul Mensonides
2002</i>
50 <div style=
"margin-left: 0px;">
51 <p><small>Distributed under the Boost Software License, Version
1.0. (See
52 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a> or
54 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>