[#AnnotatedMixin-03]
= AnnotatedMixin
:mrdocs:

Template mixin that adds &hyphen;Wthread&hyphen;safety locking annotations and lock order checking to a subset of the mutex API&period;

== Synopsis

Declared in `&lt;sync&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename PARENT&gt;
class &lsqb;&lsqb;capability&rsqb;&rsqb; AnnotatedMixin
    : public PARENT
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `PARENT`
| 
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:AnnotatedMixin-03/unique_lock.adoc[`unique&lowbar;lock`] 
| Unique&hyphen;lock type for the wrapped mutex&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:AnnotatedMixin-03/2destructor.adoc[`&#126;AnnotatedMixin`] [.small]#[destructor]#
| Destroy the mixin and drop its lock&hyphen;order bookkeeping&period;
| xref:AnnotatedMixin-03/lock.adoc[`lock`] 
| Lock the underlying mutex&period;
| xref:AnnotatedMixin-03/try_lock.adoc[`try&lowbar;lock`] 
| Try to lock the underlying mutex without blocking&period;
| xref:AnnotatedMixin-03/unlock.adoc[`unlock`] 
| Unlock the underlying mutex&period;
| xref:AnnotatedMixin-03/operator_not.adoc[`operator!`] 
| For negative capabilities in the Clang Thread Safety Analysis&period; A negative requirement uses the EXCLUSIVE&lowbar;LOCKS&lowbar;REQUIRED attribute, in conjunction with the ! operator, to indicate that a mutex should not be held&period;
|===



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