Re: Trouble with std::basic_ostringstream and libc++
Re: Trouble with std::basic_ostringstream and libc++
- Subject: Re: Trouble with std::basic_ostringstream and libc++
- From: Jesper Papmehl-Dufay <email@hidden>
- Date: Mon, 09 Jul 2012 18:13:10 +0200
9 jul 2012 kl. 17.48 skrev Marshall Clow:
> I see that Table 81 shows specializations for char16_t and char32_t (albeit with an extra template parameter)
> I wonder if those could be made to work. (since having a deterministic bit size is the whole reason for char16_t and char32_t)
9 jul 2012 kl. 17.49 skrev Howard Hinnant:
> C++11 has support for UTF-16 characters, and UTF-16 to UTF-8 conversions.
>
> The character type is char16_t. Unfortunately char16_t isn't directly supported by the stream classes either. But there is a convenience converter in <locale> named wstring_convert. You can use that to convert UTF-16 strings to UTF-8 strings and then stream those UTF-8 strings to the char-based streams. It would look something like this:
> […]
Thanks for the replies!
I had forgotten about char16_t & char32_t. Yes, they are basically exactly what I would like to have. :) Unfortunately, Visual Studio is lagging behind Clang a bit when it comes to C++11 features, but hopefully it won’t be too long before we can move to char16_t.
/Jesper
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden