[#bsl-is_convertible] = xref:bsl.adoc[bsl]::is_convertible :relfileprefix: ../ :mrdocs: Meta‐function for detecting implicit convertibility between types. == Synopsis Declared in `<bslmf_isconvertible.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_FROM_TYPE, class t_TO_TYPE> struct is_convertible : xref:bsl/integral_constant-02.adoc[bsl::integral_constant<bool, ::std::is_convertible<typename BloombergLP::bslmf::IsConvertible_CheckComplete<t_FROM_TYPE>::type, typename BloombergLP::bslmf::IsConvertible_CheckComplete<t_TO_TYPE>::type>::value>] ---- == Description This `struct` template implements the `is_convertible` meta‐function defined in the C++11 standard to determine whether the (template parameter) `t_FROM_TYPE` is implicitly convertible to the (template parameter) `t_TO_TYPE`. == Base Classes [cols="1,4"] |=== | Name| Description | `xref:bsl/integral_constant-02.adoc[bsl::integral_constant<bool, ::std::is_convertible<typename BloombergLP::bslmf::IsConvertible_CheckComplete<t_FROM_TYPE>::type, typename BloombergLP::bslmf::IsConvertible_CheckComplete<t_TO_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`] | 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/bslstl/IsConvertibleToCString-04.adoc[`IsConvertibleToCString`] | This `struct` template implements a meta‐function to determine if the (template parameter) `t_TYPE` is convertible to `const t_CHAR_TYPE *`. | xref:BloombergLP/bslstl/IsConvertibleToStringView-02.adoc[`IsConvertibleToStringView`] | Meta‐function for detecting types convertible to a string view. | xref:BloombergLP/bslma/UsesBslmaAllocator-0240.adoc[`UsesBslmaAllocator<bsl::basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOC>>`] | Trait indicating `basic_string` uses `bslma` allocators. | xref:BloombergLP/bslma/UsesBslmaAllocator-02f.adoc[`UsesBslmaAllocator<bsl::map<KEY, VALUE, COMPARATOR, ALLOCATOR>>`] | Trait indicating `bsl::map` uses `bslma` allocators when `ALLOCATOR` allows. | xref:BloombergLP/bslma/UsesBslmaAllocator-054.adoc[`UsesBslmaAllocator<bsl::hash_set<_Value, _HashFcn, _EqualKey, _Alloc>>`] | Trait indicating `hash_set` uses `bslma` allocators when `_Alloc` allows. | xref:BloombergLP/bslma/UsesBslmaAllocator-0573.adoc[`UsesBslmaAllocator<bsl::hash_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc>>`] | Trait indicating `hash_multimap` uses `bslma` allocators when `_Alloc` allows. | xref:BloombergLP/bslma/UsesBslmaAllocator-072.adoc[`UsesBslmaAllocator<bsl::list<VALUE, ALLOCATOR>>`] | Trait indicating `bsl::list` uses `bslma` allocators when `ALLOCATOR` allows. | xref:BloombergLP/bslma/UsesBslmaAllocator-0877.adoc[`UsesBslmaAllocator<bsl::set<KEY, COMPARATOR, ALLOCATOR>>`] | Trait indicating `bsl::set` uses `bslma` allocators when `ALLOCATOR` allows. | xref:BloombergLP/bslma/UsesBslmaAllocator-08b.adoc[`UsesBslmaAllocator<bsl::deque<VALUE_TYPE, ALLOCATOR>>`] | Trait indicating `deque` uses `bslma` allocators when `ALLOCATOR` allows. | xref:BloombergLP/bslma/UsesBslmaAllocator-08c.adoc[`UsesBslmaAllocator<bsl::multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>>`] | Trait indicating `bsl::multimap` uses `bslma` allocators when `ALLOCATOR` allows. | xref:BloombergLP/bslma/UsesBslmaAllocator-095.adoc[`UsesBslmaAllocator<bsl::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>>`] | Trait indicating `hash_multiset` uses `bslma` allocators when `_Alloc` allows. | xref:BloombergLP/bslma/UsesBslmaAllocator-0ba.adoc[`UsesBslmaAllocator<bsl::hash_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc>>`] | Trait indicating `hash_map` uses `bslma` allocators when `_Alloc` allows. | xref:BloombergLP/bslma/UsesBslmaAllocator-0bce.adoc[`UsesBslmaAllocator<bsl::multiset<KEY, COMPARATOR, ALLOCATOR>>`] | Trait indicating `bsl::multiset` uses `bslma` allocators. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#