std::counting_semaphore<LeastMaxValue>:: max
From cppreference.net
<
cpp
|
thread
|
counting semaphore
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::counting_semaphore
| Member functions | ||||
| Operations | ||||
| Constants | ||||
|
counting_semaphore::max
|
|
constexpr
std::
ptrdiff_t
max
(
)
noexcept
;
|
(C++20以降) | |
内部カウンタの最大可能な値を返します。この値は
LeastMaxValue
以上です。
戻り値
内部カウンタの最大可能値、 std::ptrdiff_t として。
注記
特殊化
binary_semaphore
において、
LeastMaxValue
は
1
に等しい。
その名が示す通り、
LeastMaxValue
は
最小
の最大値であり、
実際の
最大値ではありません。したがって
max
(
)
は
LeastMaxValue
よりも大きな数値を返す可能性があります。