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

� Copyright Housemarque Oy 2002
� Copyright Paul Mensonides 2002

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)