std::emit_on_flush, std::noemit_on_flush
来自cppreference.com
输入/输出库
输入/输出操纵符
浮点格式化 | |||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
整数格式化 | |||||||||||||||||||||||||||||||
布尔格式化 | |||||||||||||||||||||||||||||||
域宽与填充控制 | |||||||||||||||||||||||||||||||
其他格式化 | |||||||||||||||||||||||||||||||
空白符处理 | |||||||||||||||||||||||||||||||
输出冲入 | |||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
状态标志操纵 | |||||||||||||||||||||||||||||||
时间与金钱 I/O | |||||||||||||||||||||||||||||||
带引号操纵符 | |||||||||||||||||||||||||||||||
(C++14)
|
在标头
<ostream>
定义
|
||
template<
class
CharT, class
Traits >
std::basic_ostream<CharT, Traits>& emit_on_flush( std::basic_ostream<CharT, Traits>& os ); |
(1) | (C++20 起) |
template<
class
CharT, class
Traits >
std::basic_ostream<CharT, Traits>& noemit_on_flush( std::basic_ostream<CharT, Traits>& os ); |
(2) | (C++20 起) |
若 os.rdbuf() 实际指向一个 std::basic_syncbuf<CharT, Traits,
Allocator>
buf
,则控制它是否在冲入时发射(即传输数据到底层流缓冲):
1) 调用 buf.set_emit_on_sync(true)
2) 调用 buf.set_emit_on_sync(false)
否则,这些操纵符无效果。
这是仅输出的 I/O 操纵符,可用如 out << std::emit_on_flush
的表达式对任何 std::basic_ostream
类型的 out
调用它。
参数
os | - | 到输出流的引用 |
返回值
os
(到操纵后的流的引用)
示例
本节未完成 原因:暂无示例 |
参阅
更改当前同步时发射策略 ( std::basic_syncbuf<CharT,Traits,Allocator>
的公开成员函数) |