[#StdMutex]
= StdMutex
:mrdocs:

An annotated version of std&colon;&colon;mutex for Clang Thread Safety Analysis&period;

== Synopsis

Declared in `&lt;util&sol;stdmutex&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class &lsqb;&lsqb;capability&rsqb;&rsqb; StdMutex
    : public std::mutex
----

== Description

Should only be used when the sync&period;h Mutex&sol;LOCK primitives are not usable&period;

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `std::mutex`
| 
|===

== Types

[cols="1,4"]
|===
| Name| Description
| xref:StdMutex/Guard.adoc[`Guard`] 
| An annotated version of std&colon;&colon;lock&lowbar;guard for StdMutex&period;
|===


== Type Aliases

[cols="1"]
|===
| Name
| xref:StdMutex/native_handle_type.adoc[`native&lowbar;handle&lowbar;type`] 
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:StdMutex/operator_assign.adoc[`operator&equals;`]  [.small]#[deleted]#
| 
| xref:StdMutex/lock.adoc[`lock`] 
| 
| xref:StdMutex/native_handle.adoc[`native&lowbar;handle`] 
| 
| xref:StdMutex/try_lock.adoc[`try&lowbar;lock`] 
| 
| xref:StdMutex/unlock.adoc[`unlock`] 
| 
| xref:StdMutex/operator_not.adoc[`operator!`] 
| Expose the mutex as a negative capability for Clang Thread Safety Analysis&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:StdMutex/CheckNotHeld.adoc[`CheckNotHeld`] 
| Assert (for the analyzer) that a mutex is not currently held and return it&period;
|===



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