[#BloombergLP-bslmf-MetaInt-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmf.adoc[bslmf]::MetaInt :relfileprefix: ../../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<int t_INT_VALUE> struct MetaInt : xref:bsl/integral_constant-02.adoc[bsl::integral_constant<int, t_INT_VALUE>] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:bsl/integral_constant-02.adoc[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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmf/MetaInt-07/Tag-06.adoc[`Tag`] | Tag type encoding `t_INT_VALUE` for overload resolution. | xref:BloombergLP/bslmf/MetaInt-07/Type.adoc[`Type`] | This specialization of `MetaInt`. | xref:bsl/integral_constant-02/type.adoc[`type`] | Alias for this `integral_constant` specialization. | xref:bsl/integral_constant-02/value_type.adoc[`value_type`] | |=== == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmf/MetaInt-07/_04enum.adoc[`Unnamed enum`] | Compile‐time integer constants for this metafunction. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmf/MetaInt-07/2constructor-09.adoc[`MetaInt`] [.small]#[constructor]# | Constructors | xref:bsl/integral_constant-02/operator_call.adoc[`operator()`] | Return a copy of the template argument `t_VALUE`. | xref:bsl/integral_constant-02/2conversion.adoc[`operator value_type`] | |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmf/MetaInt-07/tag-0f.adoc[`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 [cols="1"] |=== | Name | xref:bsl/integral_constant-02/value.adoc[`value`] |=== == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmf/MetaInt-00.adoc[`MetaInt<0>`] | This specialization of `MetaInt` has a `VAL` of zero and is convertible to and from `bsl::false_type`. | xref:BloombergLP/bslmf/MetaInt-0b.adoc[`MetaInt<1>`] | This specialization of `MetaInt` has a `VAL` of one and is convertible to and from `bsl::true_type`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#