lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [lmi] MinGW, wstring, and wstream [Was: patch: compilation fix fo


From: Vadim Zeitlin
Subject: Re[2]: [lmi] MinGW, wstring, and wstream [Was: patch: compilation fix for wx 2.9]
Date: Sat, 15 May 2010 17:08:54 +0200

On Sat, 15 May 2010 15:04:29 +0000 Greg Chicares <address@hidden> wrote:

GC> The standard C++2003 library provides only one non-default ctor:
GC> 
GC>   explicit basic_ifstream(const char* s, ios_base::openmode mode = 
ios_base::in);
GC> 
GC> so we'd need a 'char const*' argument even for std::wifstream. And
GC> N3092 adds a ctor with a 'string const&' argument, but that's still
GC> narrow--it's not a std::wstring.

 Yes, and it's still not enough. But unfortunately this is all that's
planned for C++0x AFAIK.

GC> Does this mean that we can't use Unicode names with std::basic_fstream?

 No.

GC> Is that the problem?

 Yes.

GC> If so, is it inherent in the standard, or just a shortcoming of the
GC> MinGW implementation?

 Inherent in the standard. MSVC provides an extension to remedy it, MinGW
does not (as is its inalienable right, although this is not terribly
helpful).

GC> I'm guessing that it's inherent in the standard, because boost adds
GC>   explicit basic_ifstream( const wpath & file_ph );
GC> So will we need an extension like that in order to support Unicode
GC> filenames someday?

 Yes. Either that (not before another 10 years) or use boost or wxWidgets.

 HTH,
VZ

reply via email to

[Prev in Thread] Current Thread [Next in Thread]