Back to Arangodb

integral_c

3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/integral-c.html

3.12.9.12.6 KB
Original Source

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

integral_c

Synopsis

template<
      typename T, T N
    >
struct[integral\_c](./integral-c.html){
    //_unspecified_// ...
};

Description

A generic Integral Constant wrapper.

#include <[boost/mpl/integral\_c.hpp](../../../../boost/mpl/integral_c.hpp)>

Model of

Integral Constant

Parameters

ParameterRequirementDescription
TAn integral typeWrapper's value type.
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 type t and integral constant n:

ExpressionSemantics
integral_c<t,c>An Integral Constant x such that x::value == c and x::value_type is identical to t.

Example

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

See also

Data Types, Integral Constant, bool_, int_, long_, size_t

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