This specialization of MetaInt has a VAL of one and is convertible to and from bsl::true_type.

Synopsis

Declared in <bslmf_metaint.h>

template<>
struct MetaInt<1>
    : bsl::true_type

Base Classes

Name

Description

bsl::true_type

Metafunction representing the boolean constant true.

Type Aliases

Name

Tag

Type

Enums

Member Functions

Name

Description

MetaInt [constructor]

Does nothing (MetaInt is stateless).

MetaInt [constructor]

Convert from a bsl::true_type.

operator bool

Return true. (This operator is conversion operator to bool.)

Static Member Functions

Name

Description

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.

Created with MrDocs