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 ) ;

Si failed() renvoie false , insère le caractère c dans le tampon de flux associé en appelant pbuf - > sputc ( c ) , où pbuf est le membre privé de type streambuf_type* . Sinon, ne fait rien.

Si l'appel à pbuf - > sputc ( c ) retourne Traits :: eof , positionne le drapeau failed() à true.

Table des matières

Paramètres

c - le caractère à insérer

Valeur de retour

* this

Exemple

Voir aussi

écrit un caractère dans la zone de sortie et avance le pointeur suivant
(fonction membre publique de std::basic_streambuf<CharT,Traits> )