|
5402 | 5402 | namespace std {
|
5403 | 5403 | class latch {
|
5404 | 5404 | public:
|
| 5405 | + static constexpr ptrdiff_t max() noexcept; |
| 5406 | + |
5405 | 5407 | constexpr explicit latch(ptrdiff_t expected);
|
5406 | 5408 | ~latch();
|
5407 | 5409 |
|
|
5429 | 5431 | Concurrent invocations of the member functions of \tcode{latch},
|
5430 | 5432 | other than its destructor, do not introduce data races.
|
5431 | 5433 |
|
| 5434 | +\indexlibrarymember{max}{latch}% |
| 5435 | +\begin{itemdecl} |
| 5436 | +static constexpr ptrdiff_t max() noexcept; |
| 5437 | +\end{itemdecl} |
| 5438 | + |
| 5439 | +\begin{itemdescr} |
| 5440 | +\pnum |
| 5441 | +\returns |
| 5442 | +The maximum value of \tcode{counter} that the implementation supports. |
| 5443 | +\end{itemdescr} |
| 5444 | + |
5432 | 5445 | \indexlibraryctor{latch}%
|
5433 | 5446 | \begin{itemdecl}
|
5434 | 5447 | constexpr explicit latch(ptrdiff_t expected);
|
|
5437 | 5450 | \begin{itemdescr}
|
5438 | 5451 | \pnum
|
5439 | 5452 | \expects
|
5440 |
| -\tcode{expected >= 0} is \tcode{true}. |
| 5453 | +\tcode{expected >= 0} is \tcode{true} and |
| 5454 | +\tcode{expected <= max()} is \tcode{true}. |
5441 | 5455 |
|
5442 | 5456 | \pnum
|
5443 | 5457 | \effects
|
|
5559 | 5573 | public:
|
5560 | 5574 | using arrival_token = @\seebelow@;
|
5561 | 5575 |
|
| 5576 | + static constexpr ptrdiff_t max() noexcept; |
| 5577 | + |
5562 | 5578 | constexpr explicit barrier(ptrdiff_t expected,
|
5563 | 5579 | CompletionFunction f = CompletionFunction());
|
5564 | 5580 | ~barrier();
|
|
5651 | 5667 | \oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}), and
|
5652 | 5668 | \oldconcept{Destructible} (\tref{cpp17.destructible}) requirements.
|
5653 | 5669 |
|
| 5670 | +\indexlibrarymember{max}{barrier}% |
| 5671 | +\begin{itemdecl} |
| 5672 | +static constexpr ptrdiff_t max() noexcept; |
| 5673 | +\end{itemdecl} |
| 5674 | + |
| 5675 | +\begin{itemdescr} |
| 5676 | +\pnum |
| 5677 | +\returns |
| 5678 | +The maximum expected count that the implementation supports. |
| 5679 | +\end{itemdescr} |
| 5680 | + |
5654 | 5681 | \indexlibraryctor{barrier}
|
5655 | 5682 | \begin{itemdecl}
|
5656 | 5683 | constexpr explicit barrier(ptrdiff_t expected,
|
|
5660 | 5687 | \begin{itemdescr}
|
5661 | 5688 | \pnum
|
5662 | 5689 | \expects
|
5663 |
| -\tcode{expected >= 0} is \tcode{true}. |
| 5690 | +\tcode{expected >= 0} is \tcode{true} and |
| 5691 | +\tcode{expected <= max()} is \tcode{true}. |
5664 | 5692 |
|
5665 | 5693 | \pnum
|
5666 | 5694 | \effects
|
|
0 commit comments