Back to Arangodb

int_

3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/int.html

3.12.9.12.4 KB
Original Source

| Prev Next | Back Along | Up Home | Full TOC | Front Page / Data Types / Numeric / int_ |

int_

Synopsis

template<
      int N
    >
struct[int\_](./int.html){
    //_unspecified_// ...
};

Description

An Integral Constant wrapper for int.

#include <[boost/mpl/int.hpp](../../../../boost/mpl/int.hpp)>

Model of

Integral Constant

Parameters

ParameterRequirementDescription
NAn integral constantA value to wrap.

Expression semantics

The semantics of an expression are defined only where they differ from, or are not defined in Integral Constant.

For arbitrary integral constant n:

ExpressionSemantics
int_<c>An Integral Constant x such that x::value == c and x::value_type is identical to int.

Example

typedef[int\_](./int.html)<8> eight;[BOOST\_MPL\_ASSERT](./assert.html)(( is_same< eight::[value\_type](./value-type.html), int > ));[BOOST\_MPL\_ASSERT](./assert.html)(( is_same< eight::type, eight > ));[BOOST\_MPL\_ASSERT](./assert.html)(( is_same<[next](./next.html)< eight >::type,[int\_](./int.html)<9> > ));[BOOST\_MPL\_ASSERT](./assert.html)(( is_same<[prior](./prior.html)< eight >::type,[int\_](./int.html)<7> > ));[BOOST\_MPL\_ASSERT\_RELATION](./assert-relation.html)( (eight::value), ==, 8 );
assert( eight() == 8 );

See also

Data Types, Integral Constant, long_, size_t, integral_c

| 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) |