8#ifndef INCLUDED_BSLMF_METAINT
9#define INCLUDED_BSLMF_METAINT
141#include <bslscm_version.h>
161template <
int t_INT_VALUE>
165 "use 'integral_constant' instead")
166MetaInt : public
bsl::integral_constant<
int, t_INT_VALUE> {
168#if defined(BSLS_COMPILERFEATURES_SUPPORT_STATIC_ASSERT)
169 static_assert(t_INT_VALUE >= 0,
"t_INT_VALUE must be non-negative");
173 typedef MetaInt<t_INT_VALUE> Type;
175#ifdef BSLS_PLATFORM_CMP_IBM
177#pragma report(disable, "1540-0724")
182#ifdef BSLS_PLATFORM_CMP_IBM
186 enum { VALUE = t_INT_VALUE };
196 MetaInt(
const MetaInt&) =
default;
197 MetaInt& operator=(
const MetaInt&) =
default;
198 ~MetaInt() =
default;
219 "use 'integral_constant' instead")
220MetaInt<0> : public
bsl::false_type {
223 typedef MetaInt<0> Type;
236 MetaInt(
const MetaInt&) =
default;
237 MetaInt& operator=(
const MetaInt&) =
default;
238 ~MetaInt() =
default;
255 operator bool()
const;
264 "use 'integral_constant' instead")
265MetaInt<1> : public
bsl::true_type {
268 typedef MetaInt<1> Type;
281 MetaInt(
const MetaInt&) =
default;
282 MetaInt& operator=(
const MetaInt&) =
default;
283 ~MetaInt() =
default;
300 operator bool()
const;
306#define BSLMF_METAINT_TO_INT(expr) BSLMF_TAG_TO_INT((expr).tag())
312#define BSLMF_METAINT_TO_BOOL(expr) BSLMF_TAG_TO_BOOL((expr).tag())
314#ifndef BDE_OPENSOURCE_PUBLICATION
323#define bslmf_MetaInt bslmf::MetaInt
331template <
int t_INT_VALUE>
333MetaInt<t_INT_VALUE>::MetaInt()
337template <
int t_INT_VALUE>
365MetaInt<0>::operator bool()
const
371MetaInt<1>::operator bool()
const
#define BSLS_DEPRECATE_FEATURE(UOR, FEATURE, MESSAGE)
Definition bsls_deprecatefeature.h:319
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlb_printmethods.h:283
Definition bdlbb_blob.h:576
Definition bslmf_integralconstant.h:244
Definition bslmf_tag.h:163