Section: 31.4.2 [iostream.objects.overview] Status: WP Submitter: Tim Song Opened: 2023-02-09 Last modified: 2023-02-13 11:31:17 UTC
Priority: Not Prioritized
View all other issues in [iostream.objects.overview].
View all issues with WP status.
In the old world, #include <iostream> behaves as if it defined a static-storage-duration ios_base::Init object, which causes the standard iostreams objects to be initialized (if necessary) on startup and flushed on shutdown.But we don't include headers with import std;, so we need separate wording to provide this guarantee. The proposed resolution below was adapted from a suggestion by Mathias Stearn on the reflector.
[2023-02-09 Tim updates wording following LWG discussion]
[Issaquah 2023-02-09; LWG]
Move to Immediate for C++23
[2023-02-13 Status changed: Immediate → WP.]
This wording is relative to N4928.
Modify 31.4.2 [iostream.objects.overview]p5 as indicated:
-5- The results of including <iostream> in a translation unit shall be as if <iostream> defined an instance of ios_base::Init with static storage duration.