From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2006-12-22 15:44:21
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Pavol Droba
> Would it be possible to add BOOST_PP_RESET_COUNTER() macro.
> The effect is to reset BOOST_PP_COUNTER to zero.
The purpose of the counter is to provide a globally unique number--across
includes and across libraries. If actually need a variable, you should use the
slot mechanism instead. It is a little more wordy, but it gives you more
control over what the value actually is.
#define BOOST_PP_VALUE 0
BOOST_PP_SLOT(1) // 0
#define BOOST_PP_VALUE BOOST_PP_SLOT(1) + 1
BOOST_PP_SLOT(1) // 1
We could add a BOOST_PP_SLOT_INC macro to shorten this.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk