std::counting_semaphore<LeastMaxValue>:: max
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Operations | ||||
| Constants | ||||
|
counting_semaphore::max
|
|
constexpr
std::
ptrdiff_t
max
(
)
noexcept
;
|
(depuis C++20) | |
Retourne la valeur maximale possible du compteur interne, qui est supérieure ou égale à
LeastMaxValue
.
Valeur de retour
La valeur maximale possible du compteur interne, en tant que std::ptrdiff_t .
Notes
Pour la spécialisation
binary_semaphore
,
LeastMaxValue
est égal à
1
.
Comme son nom l'indique, le
LeastMaxValue
est la valeur maximale
minimale
, et non la valeur maximale
réelle
. Par conséquent,
max
(
)
peut produire un nombre supérieur à
LeastMaxValue
.