3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/max.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Metafunctions / Miscellaneous / max |
template<
typename N1
, typename N2
>
struct[max](./max.html){
typedef_unspecified_type;
};
Returns the larger of its two arguments.
#include <[boost/mpl/min\_max.hpp](../../../../boost/mpl/min_max.hpp)>
| Parameter | Requirement | Description |
|---|---|---|
| N1, N2 | Any type | Types to compare. |
For arbitrary types x and y:
typedef[max](./max.html)<x,y>::type r;
| Return type: |
A type.
| | Precondition: |
less<x,y>::value is a well-formed integral constant expression.
| | Semantics: |
Equivalent to
typedef[if\_](./if.html)<[less](./less.html)<x,y>,y,x >::type r;
|
Constant time.
typedef[fold](./fold.html)<[vector\_c](./vector-c.html)<int,1,7,0,-2,5,-1>
,[int\_](./int.html)<10>
,[max](./max.html)<[\_1](./placeholders.html),[\_2](./placeholders.html)>
>::type r;[BOOST\_MPL\_ASSERT](./assert.html)(( is_same< r,[int\_](./int.html)<10> > ));
Metafunctions, comparison, min, less, max_element
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |