This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: ofstream, fsync and data loss bugs
On 03/18/2010 12:33 AM, Joe Buck wrote:
> Are you suggesting putting an fsync() in every close()? That
> would be hugely expensive.
>
Yeah... Actually, reminds me when novice C++ programmer are advised
*against* using << std::endl; instead << '\n';
But I agree something seems lacking in the ISO C++ specifications about
making the file descriptor available, by now it's really a FAQ. At some
point I think somebody even tried to discuss it within the ISO LWG, but
then the idea got lost...
Paolo.