4077. Unclear preconditions of std::ranges::generate_random

Section: 26.12.2 [alg.rand.generate] Status: New Submitter: Jiang An Opened: 2024-04-21 Last modified: 2024-08-02

Priority: 2

View other active issues in [alg.rand.generate].

View all other issues in [alg.rand.generate].

View all issues with New status.

Discussion:

Per discussion in cplusplus/draft#6904, the preconditions of std::ranges::generate_random are specified in an unusual way. It also appears that the "shall be equivalent" imposes requirements on both implementation and user code, and the requirements are not very clear. Perhaps we should clarify the conditions in usual Preconditions paragraphs.

[2024-08-02; Reflector poll]

Set priority to 2 after reflector poll. When reviewing this we were clear this imposes requirements on users.

Proposed resolution: