Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/mpl/doc/src/refmanual/max.rst @ 29

Last change on this file since 29 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.5 KB

max

Synopsis

template<
      typename N1
    , typename N2
    >
struct max
{
    typedef |unspecified| type;
};

Description

Returns the larger of its two arguments.

Model of

|Metafunction|

Parameters

Parameter Requirement Description
N1, N2 Any type Types to compare.

Expression semantics

For arbitrary types x and y:

typedef max<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_< less<x,y>,y,x >::type r;

Complexity

Constant time.

Example

typedef fold<
      vector_c<int,1,7,0,-2,5,-1>
    , int_<10>
    , max<_1,_2>
    >::type r;
BOOST_MPL_ASSERT(( is_same< r, int_<10> > ));

Docutils System Messages

???????
Note: See TracBrowser for help on using the repository browser.