This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

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

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

Priority: Not Prioritized

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.

Proposed resolution: