BloombergLP::bslmf::MetaInt

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.

Synopsis

Declared in <bslmf_metaint.h>

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

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

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 value_type

Static Member Functions

NameDescription
tag Declared but not defined. Meta-function use only. The tag can be used to recover meta-information from an expression. Example: sizeof(f(expr).tag()) returns a different compile-time value depending on the type of the result of calling the f function but does not actually call the f function or the tag method at run-time. Note that f(expr)::VALUE or sizeof(f(expr)::Type) would be ill-formed and that f(expr).value is not a compile-time expression.

Static Data Members

Name
value

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.