Skip to content

US365 32.08 [thread.coord] For latch and barrier, do not require ptrdiff_t support P1865 #361

@wg21bot

Description

@wg21bot

latch and barrier currently take a ptrdiff_t as their expected count parameter and thus must support any expected count (larger than or equal to 0) that will fit in a ptrdiff_t. This limits implementation freedom; some platforms can provide a much more efficient implementation of latch and barrier if they can restrict the maximum possible expected count.

Proposed change:
Adopt P1865, which adds a static constexpr ptrdiff_t max() noexcept; member to both classes that returns the expressible range of the object, like the one on counting_semaphore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions