[#bsl-is_same-051]
= xref:bsl.adoc[bsl]::is&lowbar;same
:relfileprefix: ../
:mrdocs:

Meta&hyphen;function for detecting whether two types are the same&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;TYPE1,
    class t&lowbar;TYPE2&gt;
struct is&lowbar;same
    : xref:bsl/false_type.adoc[false&lowbar;type]
----

== Description

This `struct` template provides a meta&hyphen;function to determine whether the (template parameter) `t&lowbar;TYPE1` and the (template parameter) `t&lowbar;TYPE2` are the same&period; This generic default template derives from `bsl&colon;&colon;false&lowbar;type`&period; A template specialization is provided (below) that derives from `bsl&colon;&colon;true&lowbar;type`&period;

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:bsl/false_type.adoc[false&lowbar;type]`
| Metafunction representing the boolean constant `false`&period;
|===

== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:bsl/is_same-05e.adoc[`is&lowbar;same&lt;t&lowbar;TYPE, t&lowbar;TYPE&gt;`] 
| This partial specialization of `is&lowbar;same` derives from `bsl&colon;&colon;true&lowbar;type` for when the (template parameter) types are the same&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Variant_IsSameReturnType-08.adoc[`Variant&lowbar;IsSameReturnType&lt;t&lowbar;RET, t&lowbar;VISITOR, t&lowbar;VARIANT, 0&gt;`] 
| Check the return type of invoking `t&lowbar;VISITOR` on alternative `0`&period;
|===


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