[#BloombergLP-bslmf-MetaInt-07]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmf.adoc[bslmf]::MetaInt
:relfileprefix: ../../
:mrdocs:

Distinct type representing a non&hyphen;negative compile&hyphen;time integer value&period;

== Synopsis

Declared in `&lt;bslmf&lowbar;metaint&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;int t&lowbar;INT&lowbar;VALUE&gt;
struct MetaInt
    : xref:bsl/integral_constant-02.adoc[bsl::integral&lowbar;constant&lt;int, t&lowbar;INT&lowbar;VALUE&gt;]
----

== Description

Instantiating this template produces a distinct type for each non&hyphen;negative integer value&period; This template has been deprecated in favor of the standard `integral&lowbar;constant` template&period;

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:bsl/integral_constant-02.adoc[bsl::integral&lowbar;constant&lt;int, t&lowbar;INT&lowbar;VALUE&gt;]`
| Metafunction representing a compile&hyphen;time constant of the specified (template parameter) `t&lowbar;TYPE` with the specified (template parameter) `t&lowbar;VALUE`&period;
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/MetaInt-07/Tag-06.adoc[`Tag`] 
| Tag type encoding `t&lowbar;INT&lowbar;VALUE` for overload resolution&period;
| xref:BloombergLP/bslmf/MetaInt-07/Type.adoc[`Type`] 
| This specialization of `MetaInt`&period;
| xref:bsl/integral_constant-02/type.adoc[`type`] 
| Alias for this `integral&lowbar;constant` specialization&period;
| xref:bsl/integral_constant-02/value_type.adoc[`value&lowbar;type`] 
| Alias for the (template parameter) `t&lowbar;TYPE`&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/MetaInt-07/_04enum.adoc[`Unnamed enum`] 
| Compile&hyphen;time integer constants for this metafunction&period;
|===


== 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&lowbar;VALUE`&period;
| xref:bsl/integral_constant-02/2conversion.adoc[`operator t&lowbar;TYPE`] 
| Return a copy of the template argument `t&lowbar;VALUE`&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/MetaInt-07/tag-0f.adoc[`tag`] 
| Return a reference to a tag encoding this type&apos;s integral value&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:bsl/integral_constant-02/value.adoc[`value`] 
| The compile&hyphen;time constant value of this metafunction&period;
|===


== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/MetaInt-00.adoc[`MetaInt&lt;0&gt;`] 
| This specialization of `MetaInt` has a `VAL` of zero and is convertible to and from `bsl&colon;&colon;false&lowbar;type`&period;
| xref:BloombergLP/bslmf/MetaInt-0b.adoc[`MetaInt&lt;1&gt;`] 
| This specialization of `MetaInt` has a `VAL` of one and is convertible to and from `bsl&colon;&colon;true&lowbar;type`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
