[#bsl-integral_constant-02] = xref:bsl.adoc[bsl]::integral_constant :relfileprefix: ../ :mrdocs: Metafunction representing a compile‐time constant of the specified (template parameter) `t_TYPE` with the specified (template parameter) `t_VALUE`. == Synopsis Declared in `<bslmf_integralconstant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, t_TYPE t_VALUE> struct integral_constant : std::integral_constant<t_TYPE, t_VALUE> ---- == Base Classes [cols="1,4"] |=== | Name| Description | `std::integral_constant<t_TYPE, t_VALUE>` | |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:bsl/integral_constant-02/type.adoc[`type`] | Alias for this `integral_constant` specialization. | xref:bsl/integral_constant-02/value_type.adoc[`value_type`] | Alias for the (template parameter) `t_TYPE`. |=== == Member Functions [cols="1,4"] |=== | Name| Description | 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 t_TYPE`] | Return a copy of the template argument `t_VALUE`. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:bsl/integral_constant-02/value.adoc[`value`] | The compile‐time constant value of this metafunction. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/AAModelBsl.adoc[`AAModelBsl`] | Model tag for bsl‐AA types. | xref:BloombergLP/bslma/AAModelIsSupported-00.adoc[`AAModelIsSupported<TYPE, AAModelLegacy>`] | Specialization of `AAModelIsSupported` for the legacy‐AA model. | xref:BloombergLP/bslma/AAModelIsSupported-01a.adoc[`AAModelIsSupported<TYPE, AAModelBsl>`] | Specialization of `AAModelIsSupported` for `MODEL == AAModelBsl`, yielding `true_type` if `TYPE::allocator_type` exists and is convertible from `bsl::allocator<char>`. | xref:BloombergLP/bslma/AAModelIsSupported-01d.adoc[`AAModelIsSupported<TYPE, AAModelStl>`] | Specialization of `AAModelIsSupported` for the stl‐AA model. | xref:BloombergLP/bslma/AAModelIsSupported-0c.adoc[`AAModelIsSupported<TYPE, AAModelPmr>`] | Specialization of `AAModelIsSupported` for the pmr‐AA model. | xref:BloombergLP/bslma/AAModelLegacy.adoc[`AAModelLegacy`] | Model tag for legacy‐AA types. | xref:BloombergLP/bslma/AAModelNone.adoc[`AAModelNone`] | Model tag for non‐AA types. | xref:BloombergLP/bslma/AAModelPmr.adoc[`AAModelPmr`] | Model tag for pmr‐AA types. | xref:BloombergLP/bslma/AAModelStl.adoc[`AAModelStl`] | Model tag for stl‐AA types. | xref:BloombergLP/bslalg/ArrayPrimitives_CanBitwiseCopy.adoc[`ArrayPrimitives_CanBitwiseCopy`] | Metafunction that is `true` when `FROM_TYPE` and `TO_TYPE` are the same type (ignoring top‐level `const`) and that type is bit‐wise copyable. | xref:BloombergLP/bdlat_EnumFunctions/HasFallbackEnumerator-00.adoc[`HasFallbackEnumerator`] | Meta‐function that detects whether `TYPE` has a fallback enumerator. | xref:BloombergLP/bslmf/HasPointerSemantics-064.adoc[`HasPointerSemantics`] | Metafunction indicating whether the (template parameter) `t_TYPE` has pointer‐like semantics. | xref:BloombergLP/bslalg/HasTrait.adoc[`HasTrait`] | This meta‐function evaluates to `bsl::true_type` if the (template parameter) `TYPE` has the (template parameter) `TRAIT`, and to `bsl::false_type` otherwise. | xref:BloombergLP/bslmf/IsAccessibleBaseOf.adoc[`IsAccessibleBaseOf`] | Meta‐function for detecting if one class is an accessible base of another. | xref:BloombergLP/bslmf/IsBitwiseCopyable-08a.adoc[`IsBitwiseCopyable<bsl::pair<T1, T2>>`] | Trait indicating `pair` is bitwise‐copyable when both elements are. | xref:BloombergLP/bslmf/IsBitwiseEqualityComparable-009.adoc[`IsBitwiseEqualityComparable<bsl::pair<T1, T2>>`] | Trait indicating `pair` is bitwise equality‐comparable when both elements are and the pair has no padding. | xref:BloombergLP/bslmf/IsBitwiseMoveable-01d.adoc[`IsBitwiseMoveable<bsl::pair<T1, T2>>`] | Trait indicating `pair` is bitwise‐moveable when both elements are. | xref:BloombergLP/bslmf/IsBitwiseMoveable-07e.adoc[`IsBitwiseMoveable<bslma::ManagedPtrDeleter>`] | Specialize `IsBitwiseMoveable` to indicate that `ManagedPtrDeleter` is bitwise moveable. | xref:BloombergLP/bslmf/IsBitwiseMoveable-09dc.adoc[`IsBitwiseMoveable<bslstl::HashTable<KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR>>`] | Trait indicating `HashTable` is bitwise‐movable when its parts are. | xref:BloombergLP/bslmf/IsBitwiseMoveable-0fd8.adoc[`IsBitwiseMoveable<bslstl::BidirectionalNodePool<VALUE, ALLOCATOR>>`] | Trait indicating `BidirectionalNodePool` is bitwise moveable when its allocator is. | xref:BloombergLP/bdlat_ChoiceFunctions/IsChoice-04.adoc[`IsChoice`] | This `struct` should be specialized for third‐party types that need to expose "choice" behavior. See the component‐level documentation for further information. | xref:BloombergLP/bdlat_CustomizedTypeFunctions/IsCustomizedType-04.adoc[`IsCustomizedType`] | Meta‐function that detects whether `TYPE` exposes customized‐type behavior. | xref:BloombergLP/bdlar/IsDynamic.adoc[`IsDynamic`] | Meta‐function indicating whether the specified `t_TYPE` is in the `bdlat` dynamic‐type category. | xref:BloombergLP/bdlat_EnumFunctions/IsEnumeration-0c.adoc[`IsEnumeration`] | Meta‐function that detects whether `TYPE` exposes enumeration behavior. | xref:BloombergLP/bslmf/IsFunctionPointer.adoc[`IsFunctionPointer`] | Meta‐function to determine if a type is a free function pointer. | xref:BloombergLP/bslstl/Function_SmallObjectOptimization/IsInplaceFunc.adoc[`IsInplaceFunc`] | Boolean metafunction reporting whether `FN` uses the inplace buffer. | xref:BloombergLP/bslmf/IsMemberFunctionPointer.adoc[`IsMemberFunctionPointer`] | Meta‐function to determine if a type is a member function pointer. | xref:BloombergLP/bdlat_SequenceFunctions/IsSequence-0a.adoc[`IsSequence`] | This `struct` should be specialized for third‐party types that need to expose "sequence" behavior. See the component‐level documentation for further information. | xref:BloombergLP/bdlar/IsSimple-0c.adoc[`IsSimple`] | Meta‐function indicating whether the specified `TYPE` is in the `bdlat` simple‐type category. | xref:BloombergLP/bslmf/MetaInt-07.adoc[`MetaInt`] | Distinct type representing a non‐negative compile‐time integer value. | xref:BloombergLP/bdljsn/NumberUtil_IsSigned.adoc[`NumberUtil_IsSigned`] | Metafunction yielding whether integral `t_TYPE` is signed. | xref:BloombergLP/bslstl/Optional_ConstructsFromType.adoc[`Optional_ConstructsFromType`] | Metafunction detecting constructibility from a non‐optional type. | xref:BloombergLP/bslstl/Optional_PropagatesAllocator.adoc[`Optional_PropagatesAllocator`] | Metafunction detecting allocator propagation for const value types. | xref:bsl/Pair_ConstructionParametersPackLength.adoc[`Pair_ConstructionParametersPackLength`] | Metafunction giving the piecewise‐construction argument‐pack length. | xref:BloombergLP/bslstl/Pair_IndexOfType-006.adoc[`Pair_IndexOfType<T2, T1, T2>`] | This partial specialization of `Pair_IndexOfType` returns the index of second element of pair. | xref:BloombergLP/bslstl/Pair_IndexOfType-00c.adoc[`Pair_IndexOfType<T1, T1, T2>`] | This partial specialization of `Pair_IndexOfType` returns the index of first element of pair. | xref:BloombergLP/bdlar/SimpleTypeIdOf-002.adoc[`SimpleTypeIdOf<bdlt::TimeTz>`] | Specialization of `SimpleTypeIdOf` for `bdlt::TimeTz`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-003.adoc[`SimpleTypeIdOf<long long>`] | Specialization of `SimpleTypeIdOf` for `long long`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-00d.adoc[`SimpleTypeIdOf<bdlt::DateTz>`] | Specialization of `SimpleTypeIdOf` for `bdlt::DateTz`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-010.adoc[`SimpleTypeIdOf<bdlt::Date>`] | Specialization of `SimpleTypeIdOf` for `bdlt::Date`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-01d.adoc[`SimpleTypeIdOf<unsigned short>`] | Specialization of `SimpleTypeIdOf` for `unsigned short`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-01f.adoc[`SimpleTypeIdOf<bdldfp::Decimal64>`] | Specialization of `SimpleTypeIdOf` for `bdldfp::Decimal64`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-02.adoc[`SimpleTypeIdOf<bsl::vector<char>>`] | Specialization of `SimpleTypeIdOf` for `bsl::vector<char>`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-032.adoc[`SimpleTypeIdOf<unsigned long>`] | Specialization of `SimpleTypeIdOf` for `unsigned long`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-0386d.adoc[`SimpleTypeIdOf<short>`] | Specialization of `SimpleTypeIdOf` for `short`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-0386f.adoc[`SimpleTypeIdOf<signed char>`] | Specialization of `SimpleTypeIdOf` for `signed char`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-03b.adoc[`SimpleTypeIdOf<char>`] | Specialization of `SimpleTypeIdOf` for `char`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-068.adoc[`SimpleTypeIdOf<float>`] | Specialization of `SimpleTypeIdOf` for `float`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-06a.adoc[`SimpleTypeIdOf<bdlt::Time>`] | Specialization of `SimpleTypeIdOf` for `bdlt::Time`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-08.adoc[`SimpleTypeIdOf<bsl::string>`] | Specialization of `SimpleTypeIdOf` for `bsl::string`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-0902.adoc[`SimpleTypeIdOf<bool>`] | Specialization of `SimpleTypeIdOf` for `bool`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-090c.adoc[`SimpleTypeIdOf<unsigned char>`] | Specialization of `SimpleTypeIdOf` for `unsigned char`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-0a.adoc[`SimpleTypeIdOf<int>`] | Specialization of `SimpleTypeIdOf` for `int`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-0b6.adoc[`SimpleTypeIdOf<unsigned long long>`] | Specialization of `SimpleTypeIdOf` for `unsigned long long`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-0bb.adoc[`SimpleTypeIdOf<double>`] | Specialization of `SimpleTypeIdOf` for `double`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-0d4.adoc[`SimpleTypeIdOf<long>`] | Specialization of `SimpleTypeIdOf` for `long`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-0dc.adoc[`SimpleTypeIdOf<unsigned int>`] | Specialization of `SimpleTypeIdOf` for `unsigned int`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-0e.adoc[`SimpleTypeIdOf<bdlt::Datetime>`] | Specialization of `SimpleTypeIdOf` for `bdlt::Datetime`. | xref:BloombergLP/bdlar/SimpleTypeIdOf-0f.adoc[`SimpleTypeIdOf<bdlt::DatetimeTz>`] | Specialization of `SimpleTypeIdOf` for `bdlt::DatetimeTz`. | xref:BloombergLP/bslma/UsesBslmaAllocator-01f.adoc[`UsesBslmaAllocator<bsl::pair<T1, T2>>`] | Trait indicating `pair` uses `bslma` allocators when either element does. | xref:BloombergLP/bslma/UsesBslmaAllocator-020.adoc[`UsesBslmaAllocator`] | Metafunction that is `true_type` if `TYPE` uses the `bslma` allocator idiom. | xref:BloombergLP/bslstl/Variant_AssignsFromType.adoc[`Variant_AssignsFromType`] | Determine whether `t_TYPE` assigns to a unique alternative of `t_VARIANT`. | xref:BloombergLP/bslstl/Variant_ConstructsFromType.adoc[`Variant_ConstructsFromType`] | Determine whether `t_TYPE` constructs a unique alternative of `t_VARIANT`. | xref:BloombergLP/bslstl/Variant_ConvertsWithoutNarrowing-0a.adoc[`Variant_ConvertsWithoutNarrowing<t_DEST, t_SOURCE, bsl::void_t<decltype(Variant_ArrayHelper<t_DEST>{{std::declval<t_SOURCE>()}})>>`] | Determine whether `t_SOURCE` converts to `t_DEST` without narrowing. | xref:BloombergLP/bslstl/Variant_CountCVType-03.adoc[`Variant_CountCVType`] | Count occurrences of `t_TYPE` in `t_HEAD, t_TAIL...`, ignoring cv‐quals. | xref:BloombergLP/bslstl/Variant_CountCVType-09.adoc[`Variant_CountCVType<t_TYPE, BSLSTL_VARIANT_NOT_A_TYPE>`] | Specialization for purposes of the sim_cpp11_features.pl script. | xref:BloombergLP/bslstl/Variant_CountType-0c.adoc[`Variant_CountType<t_TYPE, BSLSTL_VARIANT_NOT_A_TYPE>`] | Specialization for purposes of the sim_cpp11_features.pl script. | xref:BloombergLP/bslstl/Variant_CountType-0d.adoc[`Variant_CountType`] | Count how many times `t_TYPE` occurs among the listed alternatives. | xref:BloombergLP/bslstl/Variant_HasUniqueCVType-0f.adoc[`Variant_HasUniqueCVType<t_TYPE, bsl::variant<t_HEAD, t_TAIL...>>`] | Determine whether `t_TYPE` occurs exactly once, ignoring cv‐quals. | xref:BloombergLP/bslstl/Variant_HasUniqueType-02.adoc[`Variant_HasUniqueType<t_TYPE, bsl::variant<t_HEAD, t_TAIL...>>`] | Determine whether `t_TYPE` occurs exactly once in a `bsl::variant`. | xref:BloombergLP/bslstl/Variant_IsAlternativeConstructibleFrom-0e.adoc[`Variant_IsAlternativeConstructibleFrom`] | Determine whether the unique best‐match alternative is constructible. | xref:BloombergLP/bslstl/Variant_IsBitwiseMoveableAll-0c.adoc[`Variant_IsBitwiseMoveableAll`] | This component‐private metafunction is derived from `bsl::true_type` if all template arguments are bitwise moveable, and from `bsl::false_type` otherwise. | xref:BloombergLP/bslstl/Variant_IsCopyAssignableAll-0d.adoc[`Variant_IsCopyAssignableAll`] | This component‐private metafunction is derived from `bsl::true_type` if all template parameters are copy assignable, and `bsl::false_type` otherwise. | xref:BloombergLP/bslstl/Variant_IsCopyConstructibleAll-03.adoc[`Variant_IsCopyConstructibleAll`] | This component‐private metafunction is derived from `bsl::true_type` if all template parameters are copy constructible, and `bsl::false_type` otherwise. | xref:BloombergLP/bslstl/Variant_IsMoveAssignableAll-0e.adoc[`Variant_IsMoveAssignableAll`] | This component‐private metafunction is derived from `bsl::true_type` if all template parameters are move assignable, and `bsl::false_type` otherwise. | xref:BloombergLP/bslstl/Variant_IsMoveConstructibleAll-05.adoc[`Variant_IsMoveConstructibleAll`] | This component‐private metafunction is derived from `bsl::true_type` if all template parameters are move constructible, and `bsl::false_type` otherwise. | xref:BloombergLP/bslstl/Variant_IsSameReturnType-02.adoc[`Variant_IsSameReturnType`] | Determine whether `t_VISITOR` yields `t_RET` for every alternative. | xref:BloombergLP/bdlb/Variant_ReturnValueHelper.adoc[`Variant_ReturnValueHelper`] | Component‐private helper that detects a visitor `ResultType`. | xref:BloombergLP/bslstl/Variant_TypeToIndexImpl-07.adoc[`Variant_TypeToIndexImpl<t_INDEX, t_TYPE, BSLSTL_VARIANT_NOT_A_TYPE>`] | Handle the case where `t_TYPE` was not found in the alternative list. | xref:BloombergLP/bslstl/Variant_UsesBslmaAllocatorAny-0e.adoc[`Variant_UsesBslmaAllocatorAny`] | This component‐private metafunction is derived from `bsl::true_type` if at least one template argument uses an allocator, and from `bsl::false_type` otherwise. | xref:BloombergLP/bslstl/Variant_isAlternativeAssignableFrom-07.adoc[`Variant_isAlternativeAssignableFrom`] | Determine whether the unique best‐match alternative is assignable. | xref:bsl/is_arithmetic.adoc[`is_arithmetic`] | Standard meta‐function for determining arithmetic types. | xref:bsl/is_convertible.adoc[`is_convertible`] | Meta‐function for detecting implicit convertibility between types. | xref:bsl/is_copy_constructible.adoc[`is_copy_constructible`] | Meta‐function for detecting copy‐constructible types. | xref:bsl/is_empty.adoc[`is_empty`] | Meta‐function for detecting empty class types. | xref:bsl/is_enum.adoc[`is_enum`] | Meta‐function for detecting enumerated types. | xref:bsl/is_floating_point.adoc[`is_floating_point`] | Meta‐function for determining floating‐point types. | xref:bsl/is_function-05.adoc[`is_function`] | Meta‐function for detecting function types. | xref:bsl/is_fundamental-09.adoc[`is_fundamental`] | Standard meta‐function for detecting fundamental types. | xref:bsl/is_integral.adoc[`is_integral`] | This `struct` template implements the `is_integral` meta‐function defined in the C++11 standard to determine if the (template parameter) `t_TYPE` is an integral type. | xref:bsl/is_lvalue_reference.adoc[`is_lvalue_reference`] | Metafunction that is `true` if the (template parameter) `t_TYPE` is an lvalue reference type. | xref:bsl/is_polymorphic.adoc[`is_polymorphic`] | Meta‐function for detecting polymorphic types. | xref:bsl/variant_size-09.adoc[`variant_size<variant<t_HEAD, t_TAIL...>>`] | Provide the number of alternatives of a `bsl::variant` specialization. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#