The BOOST_PP_ASSIGN_SLOT macro fully evaluates a numeric macro or expression.

Usage

#include BOOST_PP_ASSIGN_SLOT(i)

Arguments

i
The slot index that is to be assigned.  This value must be in the range of 1 to BOOST_PP_LIMIT_SLOT_COUNT.

Remarks

Prior to use, the named external argument BOOST_PP_VALUE must be defined.  Also, it must expand to a numeric value that is in the range of 0 to 2^32 - 1.

See Also

Requirements

Header:  <boost/preprocessor/slot/slot.hpp>

Sample Code

#include <boost/preprocessor/slot/slot.hpp>

#define X() 4

#define BOOST_PP_VALUE 1 + 2 + 3 + X()
#include BOOST_PP_ASSIGN_SLOT(1)

#undef X

BOOST_PP_SLOT(1) // expands to 10

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