Re: [Mingw-w64-public] Windows/MinGW extension: opening std::fstream with a wstring/wchar_t*

2011-06-27 Thread Jonathan Wakely
On 27 June 2011 20:50, Ruben Van Boxem wrote: > (If it is liked here, I see no reason not to also propose it to LLVM's > libc++). Why? libc++ only supports Mac OS X, so adding Windows-only extensions seems pointless. How does the Rogue Wave / Apache stdcxx support whar_t filenames on Windows? N.

Re: [Mingw-w64-public] Windows/MinGW extension: opening std::fstream with a wstring/wchar_t*

2011-06-27 Thread Sam Morris
> 2011/6/26 Sam Morris : > > FYI, I think you can do this without modifying the fstream like this: > > > > __gnu_cxx::stdio_filebuf b (_wopen (L"filename", _O_RDONLY)); > > std::istream i (&b); > > > > The stdio_filebuf will close the file when it's done. > > > > stdio_filebuf can also be construct

Re: [Mingw-w64-public] Windows/MinGW extension: opening std::fstream with a wstring/wchar_t*

2011-06-27 Thread Ruben Van Boxem
2011/6/26 Jonathan Wakely : > On 26 June 2011 16:26, Jonathan Wakely wrote: >> On 26 June 2011 16:06, Ruben Van Boxem wrote: >>> >>> No extra #includes are necessary, and for now I #ifdef'ed the extra >>> code with #if _WIN32. Perhaps cleaner would be a configure check for >>> OS or CRT used and a