The BOOST_PP_TUPLE_EAT macro expands to a macro that eats a tuple of the specified size.

Usage

BOOST_PP_TUPLE_EAT(size)

Arguments

size
The size of the tuple to be eaten.  Valid tuple sizes range from 0 to BOOST_PP_LIMIT_TUPLE

Remarks

The size argument must be the actual size of the tuple.

See Also

Requirements

Header:  <boost/preprocessor/tuple/eat.hpp>

Sample Code

#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/tuple/eat.hpp>

#define OP(a, b) (a b)

#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT(2))(1, 2)

MACRO(0) // expands to nothing
MACRO(1) // expands to (1, 2)

© 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)