Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Macro BOOST_VMD_NUMBER

BOOST_VMD_NUMBER — Expands to a tuple of the beginning number and the preprocessor tokens after the beginning number in a parameter.

Synopsis

// In header: <boost/vmd/number.hpp>

BOOST_VMD_NUMBER(...)

Description

... = One to three variadic parameters. These parameters are:

first = required, the macro parameter to test for a beginning number. second = optional, cnumber an optional digit from 1-5 indicating the maximum amount of consecutive numbers in the parameter. Specifying 1 is not necessary but allowed, as 1 is the default. The actual cnumber may be more than the amount of consecutive numbers which exist. The consecutive numbers must either end the parameter or have a set of parenthesis after them for the beginning number to be found.

OR

isequence an optional Boost PP sequence of 1-5 elements. The elements of the sequence are keys for possibly subsequent identifiers. The keys can be specified as either a single key or as a tuple of keys. The actual number of sequence elements may be more than the amount of consecutive identifiers which exist after the beginning number. The identifiers matching the keys must either end the parameter or have a set of parenthesis after them for the beginning number to be found.

third = optional, isequence if the second optional variadic parameter is a 'cnumber', the third parameter can be an 'isequence'. This allows the beginning number to be followed by one or more other numbers, and then followed by one or more identifiers.

returns = the result is a tuple of two elements. If a beginning number is not found, both elements of the tuple are empty. If a beginning number is found, the first element is the number and the second element is the preprocessor tokens after the number.

The number if found must be in the range of numbers for the Boost preprocessor library, which is 0 to 256.


PrevUpHomeNext