[cmake-developers] Questions about coding conventions

Daniel Pfeifer daniel at pfeifer-mail.de
Tue Jun 14 10:09:06 EDT 2016


On Tue, Jun 14, 2016 at 3:14 PM, Brad King <brad.king at kitware.com> wrote:
> On 06/13/2016 10:16 AM, Brad King wrote:
>>> Can't `std::ifstream` and `std::ofstream` be used directly? It seams
>>> that kwsys does some workarounds
>>
>> Yes, std::{o,f}stream can be used directly.
>
> On second thought, std::{i,o}fstream should not be used to open files.
> The cmsys::{i,o}fstream interfaces are not about compatibility, they
> are about opening files on Windows using the wide character APIs by
> converting from UTF-8 to UCS-2.

I see.

There are a few uses of std::{i,o}fstream. I guess we should migrate
them all to kwsys.


More information about the cmake-developers mailing list