std::counting_semaphore<LeastMaxValue>::max

constexpr std::ptrdiff_t max() noexcept;
(C++20 起)

返回内部计数器的最大可能值,它大于或等于 LeastMaxValue 。对于 binary_semaphoreLeastMaxValue 等于 1

返回值

作为 std::ptrdiff_t 的内部计数器的最大可能值。