The BOOST_PP_DIV macro expands to the quotient of its arguments.

Usage

BOOST_PP_DIV(x, y)

Arguments

x
The dividend (numerator) of the operation.  Valid values range from 0 to BOOST_PP_LIMIT_MAG.
y
The divisor (denominator) of the operation.  Valid values range from 1 to BOOST_PP_LIMIT_MAG.

Remarks

Previously, this macro could not be used inside BOOST_PP_WHILE.  There is no longer any such restriction.  It is more efficient, however, to use BOOST_PP_DIV_D in such a situation.
If y is 0, the result is undefined.

See Also

Requirements

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

Sample Code

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

BOOST_PP_DIV(11, 5) // expands to 2