The BOOST_PP_DEC macro expands to one less than its argument.

Usage

BOOST_PP_DEC(x)

Arguments

x
The value to be decremented.  Valid values range from 0 to BOOST_PP_LIMIT_MAG.

Remarks

If x is 0, the result is saturated to 0.

See Also

Requirements

Header:  <boost/preprocessor/arithmetic/dec.hpp>

Sample Code

#include <boost/preprocessor/arithmetic/dec.hpp>

BOOST_PP_DEC(BOOST_PP_DEC(6)) // expands to 4
BOOST_PP_DEC(0) // expands to 0