[#BloombergLP-bslstl-Optional_PropagatesAllocator] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Optional_PropagatesAllocator :relfileprefix: ../../ :mrdocs: This metafunction is derived from `bsl::true_type` if `t_TYPE` is an allocator‐aware const type, and if `t_ANY_TYPE` is the same as `t_TYPE`, minus the cv qualification. This trait is used to enable a constructor overload for a const qualified allocator‐aware `ValueType` taking an rvalue of Optional_Base of the non‐const qualified `ValueType`. Such an overload needs to propagate the allocator. == Synopsis Declared in `<bslstl_optional.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, class t_ANY_TYPE> struct Optional_PropagatesAllocator : xref:bsl/integral_constant-02.adoc[bsl::integral_constant<bool, bslma::UsesBslmaAllocator<t_TYPE>::value && bsl::is_const<t_TYPE>::value && bsl::is_same<t_ANY_TYPE, typename bsl::remove_cv<t_TYPE>::type>::value>] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:bsl/integral_constant-02.adoc[bsl::integral_constant<bool, bslma::UsesBslmaAllocator<t_TYPE>::value && bsl::is_const<t_TYPE>::value && bsl::is_same<t_ANY_TYPE, typename bsl::remove_cv<t_TYPE>::type>::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:bsl/integral_constant-02/type.adoc[`type`] | Alias for this `integral_constant` specialization. | xref:bsl/integral_constant-02/value_type.adoc[`value_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 value_type`] | |=== == Static Data Members [cols="1"] |=== | Name | xref:bsl/integral_constant-02/value.adoc[`value`] |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#