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.

4618. Unclear effects in insertion and extraction of random number engines and random number distributions

Section: 29.5.3.4 [rand.req.eng], 29.5.3.6 [rand.req.dist] Status: New Submitter: Jiang An Opened: 2026-08-30 Last modified: 2026-09-05

Priority: Not Prioritized

View all other issues in [rand.req.eng].

View all issues with New status.

Discussion:

In 29.5.3.4 [rand.req.eng] and 29.5.3.6 [rand.req.dist], operator<< and operator>> are specified with fmtflags, which looks like an exposition-only data member but doesn't actually exist in the synopses. Presumably, we should use flags() instead and specify the function calls that change flags. Additionally, Postconditions should perhaps say "restored" instead of "unchanged".

Moreover, 29.5.3.4 [rand.req.eng] p7 says "space character". But its meaning is unclear when charT is not a character type but a valid character container type, assuming the implementation allows instantiating basic_ostream with such a type.

Proposed resolution: