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.
std::filesystem operations should be observable behaviourSection: 4.1.2 [intro.abstract] Status: New Submitter: Jens Maurer Opened: 2022-02-03 Last modified: 2026-07-01
Priority: 3
View all issues with New status.
Discussion:
4.1.2 [intro.abstract] p6.2 should be amended to say that
filesystem operations such as mkdir are observable behaviour.
Any resolution would need CWG review.
[2022-03-04; Reflector poll]
Set priority to 3 after reflector poll.
[Brno 2026-06-12; LWG discussion]
Cross reference is now p8.2. Add a bullet with the words from 31.12.13.1 [fs.op.funcs.general].
[2026-06-30; Tim adds wording]
Proposed resolution:
This wording is relative to N5050.
Modify 4.1.2 [intro.abstract]p8 as indicated:
-8- The following specify the observable behavior of the program:
(8.1) — Accesses through volatile glvalues are evaluated strictly according to the rules of the abstract machine.
(8.2) — Data is delivered to the host environment to be written into files (See also: ISO/IEC 9899:2024, 7.23.3).
[Note 4: Delivering such data is followed by an observable checkpoint (31.13.1 [cstdio.syn]). Not all host environments provide access to file contents before program termination. — end note](8.?) — Files in external storage are modified (31.12.13.1 [fs.op.funcs.general]).
(8.3) —The input and output dynamics of interactive devices shall take place in such a fashion that prompting output is actually delivered before a program waits for input. What constitutes an interactive device is implementation-defined.