[#AnnotatedMixin-03] = AnnotatedMixin :mrdocs: Template mixin that adds ‐Wthread‐safety locking annotations and lock order checking to a subset of the mutex API. == Synopsis Declared in `<sync.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename PARENT> class [[capability]] 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_lock`] | Unique‐lock type for the wrapped mutex. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:AnnotatedMixin-03/2destructor.adoc[`~AnnotatedMixin`] [.small]#[destructor]# | Destroy the mixin and drop its lock‐order bookkeeping. | xref:AnnotatedMixin-03/lock.adoc[`lock`] | Lock the underlying mutex. | xref:AnnotatedMixin-03/try_lock.adoc[`try_lock`] | Try to lock the underlying mutex without blocking. | xref:AnnotatedMixin-03/unlock.adoc[`unlock`] | Unlock the underlying mutex. | xref:AnnotatedMixin-03/operator_not.adoc[`operator!`] | For negative capabilities in the Clang Thread Safety Analysis. A negative requirement uses the EXCLUSIVE_LOCKS_REQUIRED attribute, in conjunction with the ! operator, to indicate that a mutex should not be held. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#