This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
RE: wstring commented out in egcs-1.1.2 C++ library
- To: "'llewelly at 198 dot dsl dot xmission dot com'" <llewelly at 198 dot dsl dot xmission dot com>, gcc at gcc dot gnu dot org
- Subject: RE: wstring commented out in egcs-1.1.2 C++ library
- From: Michael VanLoon <MichaelV at EDIFECS dot COM>
- Date: Tue, 8 Feb 2000 15:23:17 -0800
- Cc: libstdc++ at sourceware dot cygnus dot com
From: llewelly@198.dsl.xmission.com
[mailto:llewelly@198.dsl.xmission.com]
Sent: Tuesday, February 08, 2000 1:15 AM
>As of about jan 24 or so, libstdc++-v3 supported this much of
> wstring:
>
>#include<string>
> using std::wstring;
> using std::string;
>
>#include<sstream>
> using std::wostringstream;
>
>int main()
> {
> wostringstream wo;
> wo << "Hello!\n";
> wstring hello(wo.str());
> }
>
>(I used a wostringstream because I couldn't think of anyother way to put
> text in wstring; it doesn't have a constructor that takes a char const*
> or one that takes a string. (If I read 21.3.1 correctly, such
> constructors would be an extension.))
Try:
wstring hello(L"Hello!\n");