<blockquote>New blog is out!</blockquote>
Если вы хотите использовать тот же текст, что и код. Затем добавьте тег, как это.
<pre> <blockquote>New blog is out!</blockquote></pre>
1) char16_t
and char32_t
will be distinct new types, so overloading on them will be possible.
Quote from ISO/IEC JTC1 SC22 WG21 N2018:
Define
char16_t
to be a typedef to a distinct new type, with the name_Char16_t
that has the same size and representation asuint_least16_t
. Likewise, definechar32_t
to be a typedef to a distinct new type, with the name_Char32_t
that has the same size and representation asuint_least32_t
.
Further explanation (from a devx.com article "Prepare Yourself for the Unicode Revolution"):
You're probably wondering why the В первую очередь необходимы типы и ключевые слова
_Char16_t
и_Char32_t
когда typedefsuint_least16_t
иuint_least32_t
уже доступны. Основная проблема в том, что новые виды решить является перегрузкой. Это снег возможно перегрузить функции, которые возьмите_Char16_t
и_Char32_t
аргументы и создать специализации напримерstd :: basic_string <_Char16_t>
которые отличаются отstd :: basic_string
.
2) u16string
и u32string
действительно являются частью C ++ 0x, а не только GCC'измов, поскольку они упоминаются в различных стандартных черновиках . Они будут включены в новый заголовок
. Цитата из той же статьи:
Стандартная библиотека также предоставляет
_Char16_t
и_Char32_t
typedefs, по аналогии с typedefswstring
,wcout
и т. Д. Для следующих стандартных классов:
filebuf, streambuf, streampos, streamoff, ios, istream, ostream, fstream, ifstream, ofstream, stringstream, istringstream, ostringstream,
строка