[#CountingSemaphoreGrant] = CountingSemaphoreGrant :mrdocs: RAII‐style semaphore lock == Synopsis Declared in `<semaphore_grant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<std::ptrdiff_t LeastMaxValue = std::counting_semaphore<>::max()> class CountingSemaphoreGrant; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:CountingSemaphoreGrant/2constructor-04.adoc[`CountingSemaphoreGrant`] [.small]#[constructor]# | Constructors | xref:CountingSemaphoreGrant/2destructor.adoc[`~CountingSemaphoreGrant`] [.small]#[destructor]# | Releases the held slot, if any, on destruction. | xref:CountingSemaphoreGrant/operator_assign-09.adoc[`operator=`] | Assignment operators | xref:CountingSemaphoreGrant/Acquire.adoc[`Acquire`] | Acquires the semaphore, blocking until a slot is available. | xref:CountingSemaphoreGrant/Release.adoc[`Release`] | Releases the held semaphore slot, if any. | xref:CountingSemaphoreGrant/TryAcquire.adoc[`TryAcquire`] | Attempts to acquire the semaphore without blocking. | xref:CountingSemaphoreGrant/2conversion.adoc[`operator bool`] | Reports whether this grant currently holds a semaphore slot. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#