Namespaces
Variants

std::ostreambuf_iterator<CharT,Traits>:: operator=

From cppreference.net
Iterator library
Iterator concepts
Iterator primitives
Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(C++20)
(C++20)
(C++20)
Utilities
(C++20)
Iterator adaptors
Range access
(C++11) (C++14)
(C++14) (C++14)
(C++11) (C++14)
(C++14) (C++14)
(C++17) (C++20)
(C++17)
(C++17)
ostreambuf_iterator & operator = ( CharT c ) ;

如果 failed() 返回 false ,则通过调用 pbuf - > sputc ( c ) 将字符 c 插入到关联的流缓冲区中,其中 pbuf 是类型为 streambuf_type* 的私有成员。否则,不执行任何操作。

如果对 pbuf - > sputc ( c ) 的调用返回 Traits :: eof ,则将 failed() 标志设置为 true。

目录

参数

c - 要插入的字符

返回值

* this

示例

参见

向输出区域写入一个字符并前移下一个指针
( std::basic_streambuf<CharT,Traits> 的公开成员函数)