This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Should basic_filebuf rely on posix behavior (on Windows)?


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 :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]