Back to Arangodb

BOOST_PP_MAX

3rdParty/boost/1.78.0/libs/preprocessor/doc/ref/max.html

3.12.9.11.3 KB
Original Source

The BOOST_PP_MAX macro expands to the greater of its two arguments.

Usage

BOOST_PP_MAX (x, y)

Arguments

x The first operand. Valid values range from 0 to BOOST_PP_LIMIT_MAG. y The second operand. Valid values range from 0 to BOOST_PP_LIMIT_MAG.

Remarks

This macro returns the greater of its two arguments or the value of both arguments if they are equal.

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_MAX_D in such a situation.

See Also

Requirements

Header: <boost/preprocessor/selection/max.hpp>

Sample Code

#include <[boost/preprocessor/selection/max.hpp](../headers/selection/max.html)>[BOOST\_PP\_MAX](max.html)(5, 7) // expands to 7[BOOST\_PP\_MAX](max.html)(3, 3) // expands to 3

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)