[#StdMutex-try_lock]
= xref:StdMutex.adoc[StdMutex]::try&lowbar;lock
:relfileprefix: ../
:mrdocs:

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard, &lowbar;Clang&colon;&colon;&lowbar;&lowbar;try&lowbar;acquire&lowbar;capability&lowbar;&lowbar;&rsqb;&rsqb;
bool
try&lowbar;lock() noexcept;
----

== Return Value

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====

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