Should basic_filebuf rely on posix behavior (on Windows)?
Jonathan Wakely
jwakely@redhat.com
Mon Nov 24 17:15:00 GMT 2014
On 24/11/14 11:22 -0500, Kai Tietz wrote:
>We might consider to use here binary-mode as default for Windows systems. But your sentence I can follow.
I think that would require libstdc++ to do the line-ending conversions
itself.
>I would suggest to use here instead of just 'std::ios::in' additionally the binary-mode-flag 'std::ios::in | std::ios::binary'. I tested your sample, and it works nicely.
Yes, but iostreams are supposed to be usable in text mode and perform
line-ending conversions, like stdio does. Just not using text mode
dodges the problem but doesn't solve it :-)
More information about the Libstdc++
mailing list