https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98386
--- Comment #6 from cqwrteur <unlvsur at live dot com> --- (In reply to Nathan Sidwell from comment #3) > Hm does rename(2) fail on windows if the new name exists? (in posix it > replaces, otherwise there's gonna be a race condition) well. tbh, on windows, the safest way to deal with filesystem is to use NT syscalls. Or you will not be able to access at-series apis. C++17 filesystem is a horrible mistake since every C++17 filesystem use case is a TOCTOU