Back to Arangodb

BOOST_PP_EMPTY

3rdParty/boost/1.78.0/libs/preprocessor/doc/ref/empty.html

3.12.9.11.0 KB
Original Source

The BOOST_PP_EMPTY macro is a nullary utility macro that expands to nothing.

Usage

BOOST_PP_EMPTY ()

Remarks

This macro is helps avoid inefficient macro-expansion. It is primarily useful as arguments to BOOST_PP_IF or BOOST_PP_IIF.

Requirements

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

Sample Code

#include <[boost/preprocessor/control/if.hpp](../headers/control/if.html)>
#include <[boost/preprocessor/facilities/empty.hpp](../headers/facilities/empty.html)>

#define X() result
#define MACRO(c)[BOOST\_PP\_IF](if.html)(c, X,[BOOST\_PP\_EMPTY](empty.html))()

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

Copyright Housemarque Oy 2002 Copyright Paul Mensonides 2002

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)