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

2013-03-31 Thread Diego
Sam Morris writes: > > On Sun, 26 Jun 2011 17:06:47 +0200, Ruben Van Boxem wrote: > > I have implemented a small patch that mirrors Microsoft's STL extension, > > where one can use wide strings as an argument to std::(w)fstream. This... > > FYI, I think you can do this without modifying the fst

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

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

2011-06-26 Thread 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 __GLIBCXX* macro to enable this fun

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

2011-06-26 Thread Jonathan Wakely
On 26 June 2011 16:06, Ruben Van Boxem wrote: > Hi, > > I have implemented a small patch that mirrors Microsoft's STL > extension, where one can use wide strings as an argument to > std::(w)fstream. This is very useful on Windows, where, without this > extension, there is no way to open an fstream

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

2011-06-26 Thread Sam Morris
On Sun, 26 Jun 2011 17:06:47 +0200, Ruben Van Boxem wrote: > I have implemented a small patch that mirrors Microsoft's STL extension, > where one can use wide strings as an argument to std::(w)fstream. This > is very useful on Windows, where, without this extension, there is no > way to open an fst

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

2011-06-26 Thread Ruben Van Boxem
Hi, I have implemented a small patch that mirrors Microsoft's STL extension, where one can use wide strings as an argument to std::(w)fstream. This is very useful on Windows, where, without this extension, there is no way to open an fstream for a filename containing non-ASCII characters not in the