首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::wbuffer_convert

Defined in header <locale>

?

?

template<class Codecvt, class Elem = wchar_t, class Tr = std::char_traits<Elem> > class wbuffer_convert : public std::basic_streambuf<Elem, Tr>

?

(since C++11) (deprecated in C++17)

std::wbuffer_convert类型的流缓冲区上的包装器。std::basic_streambuf<char>这让它看起来std::basic_streambuf<Elem>.所有I/O操作通过std::wbuffer_convert完成由facet定义的字符转换。Codecvt...std::wbuffer_convert假定转换面的所有权,并且不能使用由区域设置管理的方面。适用于与std::wbuffer_convertstd::codecvt_utf8对于UTF-8/UC 2和UTF-8/UC 4转换和std::codecvt_utf8_utf16对于UTF-8/UTF-16转换。

此类模板使隐式字符转换功能具有std::basic_filebuf可供任何std::basic_streambuf...

成员类型

Member type

Definition

state_type

Codecvt::state_type

成员函数

(constructor)

constructs a new wbuffer_convert (public member function)

operator=

the copy assignment operator is deleted (public member function)

(destructor)

destructs the wbuffer_convert and its conversion facet (public member function)

rdbuf

returns or replaces the underlying narrow stream buffer (public member function)

state

returns the current conversion state (public member function)

另见

Characterconversions

locale-defined multibyte(UTF-8, GB18030)

UTF-8

UTF-16

UTF-16

mbrtoc16 / c16rtomb(with C11's DR488)

codecvt<char16_t, char, mbstate_t>codecvt_utf8_utf16<char16_t>codecvt_utf8_utf16<char32_t>codecvt_utf8_utf16<wchar_t>

N/A

UCS2

c16rtomb(without C11's DR488)

codecvt_utf8<char16_t> codecvt_utf8<wchar_t>(Windows).

codecvt_utf16<char16_t> codecvt_utf16<wchar_t>(Windows).

UTF-32

mbrtoc32 / c32rtomb.

codecvt<char32_t, char, mbstate_t> codecvt_utf8<char32_t> codecvt_utf8<wchar_t>(non-Windows).

codecvt_utf16<char32_t> codecvt_utf16<wchar_t>(non-Windows).

system wide:UTF-32(non-Windows)UCS2(Windows)

mbsrtowcs / wcsrtombs use_facet<codecvt <wchar_t, char, mbstate_t>>(locale).

No

No

wstring_convert (C++11)(deprecated in C++17)

performs conversions between a wide string and a byte string (class template)

codecvt_utf8 (C++11)(deprecated in C++17)

converts between UTF-8 and UCS2/UCS4 (class template)

codecvt_utf8_utf16 (C++11)(deprecated in C++17)

converts between UTF-8 and UTF-16 (class template)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com