The BOOST_PP_TUPLE_REMOVE macro removes an element from a tuple.

Usage

BOOST_PP_TUPLE_REMOVE(tuple, i) (v)

Arguments

tuple
The tuple from which an element is to be removed.
i
The zero-based position in tuple of the element to be removed.  Valid values range from 0 to BOOST_PP_TUPLE_SIZE(tuple) - 1. If tuple has only a single element, it remains unchanged since a tuple must have at least one element.

Remarks

This macro uses BOOST_PP_WHILE interally.  Therefore, to use the d parameter passed from other macros that use BOOST_PP_WHILE, see BOOST_PP_TUPLE_REMOVE_D.

See Also

Requirements

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

Sample Code

#include <boost/preprocessor/tuple/remove.hpp>

#define TUPLE (a, b, d)

BOOST_PP_TUPLE_REMOVE(TUPLE, 2) // expands to (a, b)

© Copyright Edward Diener 2013

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)