[#BloombergLP-bslmf-DetectNestedTrait-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmf.adoc[bslmf]::DetectNestedTrait
:relfileprefix: ../../
:mrdocs:

Meta&hyphen;function for detecting nested traits&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;TYPE,
    template&lt;class&gt; typename t&lowbar;TRAIT&gt;
struct DetectNestedTrait
    : &sol;&ast; implementation-defined &ast;&sol;::type
----

== Description

This `struct` template metafunction detects whether the specified `t&lowbar;TRAIT` parameter is associated with the specified `t&lowbar;TYPE` parameter using the nested type trait mechanism&period; This trait derives from `bsl&colon;&colon;true&lowbar;type` if and only if `t&lowbar;TYPE` is a class type that associated with the specified trait using the `BSLMF&lowbar;NESTED&lowbar;TRAIT&lowbar;DECLARATION` macro, and from `bsl&colon;&colon;false&lowbar;type` otherwise&period; Users should not specialize this trait directly for their types, but should always use the macro to make a nested trait association&period;

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `&sol;&ast; implementation-defined &ast;&sol;::type`
| 
|===

== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/DetectNestedTrait-03.adoc[`DetectNestedTrait&lt;t&lowbar;TYPE volatile, t&lowbar;TRAIT&gt;`] 
| Partial specialization for volatile&hyphen;qualified types&period;
| xref:BloombergLP/bslmf/DetectNestedTrait-09.adoc[`DetectNestedTrait&lt;t&lowbar;TYPE const, t&lowbar;TRAIT&gt;`] 
| Partial specialization for const&hyphen;qualified types&period;
| xref:BloombergLP/bslmf/DetectNestedTrait-01.adoc[`DetectNestedTrait&lt;t&lowbar;TYPE const volatile, t&lowbar;TRAIT&gt;`] 
| Partial specialization for const&hyphen;volatile&hyphen;qualified types&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/HasStlIterators-0e.adoc[`HasStlIterators`] 
| This class detects if the specified class `TYPE` has STL&hyphen;like iterators&period;
|===


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