Back to Arangodb

Integral Constant

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

3.12.9.13.0 KB
Original Source

| Prev Next | Back Along | Up Home | Full TOC | Front Page / Data Types / Concepts / Integral Constant |

Integral Constant

Description

An Integral Constant is a holder class for a compile-time value of an integral type. Every Integral Constant is also a nullary Metafunction, returning itself. An integral constant object is implicitly convertible to the corresponding run-time value of the wrapped integral type.

Expression requirements

In the following table and subsequent specifications, n is a model of Integral Constant.

ExpressionTypeComplexity
n::tagintegral_c_tagConstant time.
n::value_typeAn integral typeConstant time.
n::valueAn integral constant expressionConstant time.
n::typeIntegral ConstantConstant time.
next<n>::typeIntegral ConstantConstant time.
prior<n>::typeIntegral ConstantConstant time.
n::value_type const c = n()Constant time.

Expression semantics

ExpressionSemantics
n::tagn's tag type; n::tag::value is n's conversion rank.
n::value_typeA cv-unqualified type of n::value.
n::valueThe value of the wrapped integral constant.
n::typeis_same<n::type,n>::value == true.
next<n>::typeAn Integral Constant c of type n::value_type such that c::value == n::value + 1.
prior<n>::typeAn Integral Constant c of type n::value_type such that c::value == n::value - 1.
n::value_type const c = n()c == n::value.

Models

See also

Data Types, Integral Sequence Wrapper, 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) |