![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
BOOST_PP_ENUM_SHIFTED_zBoost , ,
The BOOST_PP_ENUM_SHIFTED_z macro represents a reentry into the BOOST_PP_ENUM_SHIFTED repetition construct.
Usage
BOOST_PP_ENUM_SHIFTED_ ## z(count, macro, data)
Arguments
Remarks
This macro expands to the sequence:
macro(z, 1, data), ... macro(z, count - 1, data)
At certain times, it may be necessary to perform the concatenation with BOOST_PP_CAT rather than the preprocessor token-pasting operator.
This happens when the z value is a macro invocation itself.
It needs a delay to allow it to expand.
The syntax in such a scenario becomes:
BOOST_PP_CAT(BOOST_PP_ENUM_SHIFTED_, z)(count, macro, data).
See AlsoRequirementsSample Code#include <boost/preprocessor/arithmetic/inc.hpp> #include <boost/preprocessor/repetition/enum_shifted.hpp> #include <boost/preprocessor/repetition/repeat.hpp> #define TEXT(z, n, text) text #define MACRO(z, n, data) \ ( \ BOOST_PP_ENUM_SHIFTED_ ## z( \ BOOST_PP_INC(n), \ TEXT, data \ ) \ ) \ /**/ BOOST_PP_REPEAT(3, MACRO, class) // expands to () (class) (class, class)
© Copyright Housemarque Oy 2002
© Copyright Paul Mensonides 2002
Distributed under the Boost Software License, Version 1.0. (См. сопроводительный файл LICENSE_1_0.txt или копия на www.boost.org/LICENSE_1_0.txt) Статья BOOST_PP_ENUM_SHIFTED_z раздела может быть полезна для разработчиков на c++ и boost. Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта. :: Главная :: ::
|
||||
©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007 |