BloombergLP::bslmf::MetaInt

Distinct type representing a non-negative compile-time integer value.

Synopsis

Declared in <bslmf_metaint.h>

template<int t_INT_VALUE>
struct MetaInt
    : bsl::integral_constant<int, t_INT_VALUE>

Description

Instantiating this template produces a distinct type for each non-negative integer value. This template has been deprecated in favor of the standard integral_constant template.

Base Classes

NameDescription
bsl::integral_constant<int, t_INT_VALUE>Metafunction representing a compile-time constant of the specified (template parameter) t_TYPE with the specified (template parameter) t_VALUE.

Type Aliases

NameDescription
Tag Tag type encoding t_INT_VALUE for overload resolution.
Type This specialization of MetaInt.
type Alias for this integral_constant specialization.
value_type Alias for the (template parameter) t_TYPE.

Enums

NameDescription
Unnamed enum Compile-time integer constants for this metafunction.

Member Functions

NameDescription
MetaInt [constructor]Constructors
operator() Return a copy of the template argument t_VALUE.
operator t_TYPE Return a copy of the template argument t_VALUE.

Static Member Functions

NameDescription
tag Return a reference to a tag encoding this type's integral value.

Static Data Members

NameDescription
value The compile-time constant value of this metafunction.

Specializations

NameDescription
MetaInt<0> This specialization of MetaInt has a VAL of zero and is convertible to and from bsl::false_type.
MetaInt<1> This specialization of MetaInt has a VAL of one and is convertible to and from bsl::true_type.