BOOST_PP_IDENTITY マクロは呼び出されたときにその引数に展開される。

Usage

BOOST_PP_IDENTITY(item)()

Arguments

item
展開の結果。

Remarks

このマクロは BOOST_PP_IFBOOST_PP_IIF と共に使われて、 句のひとつだけが呼び出される必要があるときの為に設計されている。

See Also

Requirements

Header:  <boost/preprocessor/facilities/identity.hpp>

Sample Code

#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
#include <boost/preprocessor/facilities/identity.hpp>

#define MACRO(n) BOOST_PP_IF(n, BOOST_PP_IDENTITY(x), BOOST_PP_EMPTY)()

MACRO(0) // expands to nothing
MACRO(1) // expands to x