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 evaluated.  This value must be in the range of 1 to BOOST_PP_SLOT_LIMIT.

Remarks

Prior to use, the macro BOOST_PP_VALUE must be defined.  Also, it must be a numeric value when fully expanded.

See Also

Requirements

Header:  iterate.hpp

Sample Code

#include <iostream>

#include <boost/preprocessor/stringize.hpp>
#include <boost/preprocessor/iterate.hpp>

#define X() 4

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

#undef X

int main(void) {
	std::cout
		<< BOOST_PP_STRINGIZE(BOOST_PP_SLOT(1)) // outputs "10"
		<< &std::endl;
	return 0;
}