This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: wstring commented out in egcs-1.1.2 C++ library
- To: Steinar Bang <sb at metis dot no>
- Subject: Re: wstring commented out in egcs-1.1.2 C++ library
- From: <llewelly at 198 dot dsl dot xmission dot com>
- Date: Wed, 9 Feb 2000 01:06:48 -0700 (MST)
- cc: gcc at gcc dot gnu dot org
On 8 Feb 2000, Steinar Bang wrote:
> >>>>> <llewelly@198.dsl.xmission.com>:
>
> > 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.))
>
> I thought something like this, was supposed to be legal...?
> main(int argc, char* argv[])
> {
> wstring hello = L"Hello!\n";
> ...
> }
It is. It works fine. I just wasn't clueful enough to know about it.
Thank you and the other person who mentioned it.