The BOOST_PP_ENUM_SHIFTED_PARAMS macro generates a comma-separated, shifted list of parameters.
Usage
BOOST_PP_ENUM_SHIFTED_PARAMS(count, param)
Arguments
- count
-
The number of parameters to generate.
Valid values range from 0 to BOOST_PP_LIMIT_REPEAT.
- param
-
The text of the parameter.
BOOST_PP_ENUM_SHIFTED_PARAMS concatenates numbers ranging from 1 to count - 1
to generate parameters.
Remarks
This macro expands to the comma-separated sequence:
param ## 1, ... param ## count - 1
This macro facilitates a typical usage of the library.
Shifted parameter lists are common in template metaprograms.
To use the z parameter passed from other macros that use BOOST_PP_REPEAT, see BOOST_PP_ENUM_SHIFTED_PARAMS_Z.
Previously, this macro could not be used recursively inside BOOST_PP_REPEAT.
This limitation no longer exists, as the library can automatically detect the next available repetition depth.
See Also
Requirements
Sample Code