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

Class `t&lowbar;TYPE` will be convertible to `NestedTraitDeclaration&lt;t&lowbar;TYPE,t&lowbar;TRAIT,true&gt;` if `t&lowbar;TRAIT` is associated with `t&lowbar;TYPE` using the `BSLMF&lowbar;NESTED&lowbar;TRAIT&lowbar;DECLARATION` macro&period; Nested trait detection depends on `t&lowbar;COND` being true&period; If `t&lowbar;COND` is false, the nested trait detection will not see the conversion it is looking for and will not associate `t&lowbar;TRAIT` with `t&lowbar;TYPE`&period; This feature is used by `BSLMF&lowbar;NESTED&lowbar;TRAIT&lowbar;DECLARATION&lowbar;IF` to turn a trait on or off depending on a compile&hyphen;time condition (usually another trait)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;TYPE,
    template&lt;class t&lowbar;T&gt; typename t&lowbar;TRAIT,
    bool t&lowbar;COND = true&gt;
class NestedTraitDeclaration;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/NestedTraitDeclaration/Type.adoc[`Type`] 
| This `typedef` is an alias to `NestedTraitDeclaration`&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/TypeTraitHasTrivialDefaultConstructor/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bslalg&colon;&colon;TypeTraitHasTrivialDefaultConstructor` trait tag to the `bsl&colon;&colon;is&lowbar;trivially&lowbar;default&lowbar;constructible` trait metafunction&period;
| xref:BloombergLP/bdlb/TypeTraitHasPrintMethod/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bdlb&colon;&colon;TypeTraitHasPrintMethod` trait tag to the `bdlb&colon;&colon;HasPrintMethod` trait metafunction&period;
| xref:BloombergLP/bslalg/TypeTraitBitwiseEqualityComparable/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bslalg&colon;&colon;TypeTraitBitwiseEqualityComparable` trait tag to the `bslmf&colon;&colon;IsBitwiseEqualityComparable` trait metafunction&period;
| xref:BloombergLP/bdlat_TypeTraitBasicEnumeration/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bdlat&lowbar;TypeTraitBasicEnumeration` trait tag to the `bdlat&lowbar;IsBasicEnumeration` trait metafunction&period;
| xref:BloombergLP/bslalg/TypeTraitBitwiseMoveable/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bslalg&colon;&colon;TypeTraitBitwiseMoveable` trait tag to the `bslmf&colon;&colon;IsBitwiseMoveable` trait metafunction&period;
| xref:BloombergLP/bslalg/TypeTraitUsesBslmaAllocator/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bslalg&colon;&colon;TypeTraitUsesBslmaAllocator` trait tag to the `bslma&colon;&colon;UsesBslmaAllocator` trait metafunction&period;
| xref:BloombergLP/bslalg/TypeTraitPair/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bslalg&colon;&colon;TypeTraitPair` trait tag to the `bslmf&colon;&colon;IsPair` trait metafunction&period;
| xref:BloombergLP/bslalg/TypeTraitBitwiseCopyable/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bslalg&colon;&colon;TypeTraitBitwiseCopyable` trait tag to the `bsl&colon;&colon;is&lowbar;trivially&lowbar;copyable` trait metafunction&period;
| xref:BloombergLP/bdlat_TypeTraitHasFallbackEnumerator/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bdlat&lowbar;TypeTraitHasFallbackEnumerator` trait tag to the `bdlat&lowbar;HasFallbackEnumerator` trait metafunction&period;
| xref:BloombergLP/bslalg/TypeTraitHasPointerSemantics/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bslalg&colon;&colon;TypeTraitHasPointerSemantics` trait tag to the `bslmf&colon;&colon;HasPointerSemantics` trait metafunction&period;
| xref:BloombergLP/bdlat_TypeTraitBasicSequence/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bdlat&lowbar;TypeTraitBasicSequence` trait tag to the `bdlat&lowbar;IsBasicSequence` trait metafunction&period;
| xref:BloombergLP/bdlat_TypeTraitBasicCustomizedType/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bdlat&lowbar;TypeTraitBasicCustomizedType` trait tag to the `bdlat&lowbar;IsBasicCustomizedType` trait metafunction&period;
| xref:BloombergLP/bdlat_TypeTraitBasicChoice/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bdlat&lowbar;TypeTraitBasicChoice` trait tag to the `bdlat&lowbar;IsBasicChoice` trait metafunction&period;
| xref:BloombergLP/bslalg/TypeTraitHasStlIterators/NestedTraitDeclaration.adoc[`NestedTraitDeclaration`] 
| This class template ties the `bslalg&colon;&colon;TypeTraitHasStlIterators` trait tag to the `bslmf&colon;&colon;HasStlIterators` trait metafunction&period;
|===


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