<iostream>on initialization are not yet precisely specified
Section: 31.4.2 [iostream.objects.overview] Status: New Submitter: Jiang An Opened: 2023-03-27 Last modified: 2023-05-24 14:33:00 UTC
View all other issues in [iostream.objects.overview].
View all issues with New status.
LWG 3878 specified the effects of importing standard library modules on initialization.
However, the effects of including
<iostream> are not yet precisely specified.
A hostile reading may consider this to allow the
ios_base::Init variable to be
a function-local static variable or an inline variable, which defeats the purpose.
[2023-05-24; Reflector poll]
Set priority to 4 after reflector poll.
This wording is relative to N4944.
Change 31.4.2 [iostream.objects.overview]/5 as indicated:
-5- The results of including
<iostream>in a translation unit shall be as if
static storage duration. Each C++ library module (184.108.40.206 [std.modules]) in a hosted implementation shall behave as if it contains an interface unit that defines an unexported
ios_base::Initvariable with ordered initialization