在线文档教程
C++
本土化 | Localizations

do_unshift

STD::codecvt::unShift,do[医]不移位

Defined in header
public: result unshift( StateT& state, ExternT* to, ExternT* to_end, ExternT*& to_next) const;(1)
protected: virtual result do_unshift( StateT& state, ExternT* to, ExternT* to_end, ExternT*& to_next) const;(2)

1%29公共成员函数,调用成员函数。do_unshift最派生的类。

2%29如果由以下代码表示的编码codecvtfacet是状态依赖的,并且state表示不是初始Shift状态的转换状态,写入返回到初始Shift状态所需的字符。将字符写入字符数组,该数组的第一个元素由to.不超过to_end-to文字都是写的。参数to_next更新为指向最后写的字符之一。

返回值

类型值std::codecvt_base::result,说明成功情况如下:

okall necessary characters were written. state now represents initial shift state
partialnot enough space in the output buffer. to_next == to_end
errorunspecified error occurred
noconvthe encoding is not state-dependent, no termination sequence necessary

非转换专业化std::codecvt<char, char,std::mbstate_t>总是回来std::codecvt_base::noconv...

注记

此函数由std::basic_filebuf::close()在其他情况下,当最后确定状态相关的多字节字符序列时。

另见

wcrtombconverts a wide character to its multibyte representation, given state (function)
do_out virtualconverts a string from internT to externT, such as when writing to file (virtual protected member function)

© cppreference.com

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

http://en.cppreference.com/w/cpp/locale/codecvt/unShift