| I/O manipulators | ||||
| Print functions(C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++20) | ||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
| Synchronized Output | ||||
(C++20) | ||||
| Types | ||||
| Error category interface | ||||
(C++11) | ||||
(C++11) |
| Public member functions | ||||
(C++11) | ||||
(C++11) | ||||
(C++26) | ||||
| Protected member functions | ||||
basic_filebuf::overflow | ||||
| Non-member functions | ||||
(C++11) |
protected: virtual int_type overflow( int_type ch= Traits::eof()); | ||
Writes some data from the put area to the associated character sequence (to the file).
Behaves like the base class versionstd::basic_streambuf::overflow(), except that the behavior of “consuming characters” is defined as follows:
conststd::codecvt<CharT,char,typename Traits::state_type>& a_codecvt=std::use_facet<std::codecvt<CharT,char,typename Traits::state_type>>(getloc());typename Traits::state_type state;CharT* end;char xbuf[XSIZE];char* xbuf_end;std::codecvt_base::result r= a_codecvt.out(state, pbase(), pptr(), end, xbuf, xbuf+ XSIZE, xbuf_end);
| r | Operation |
|---|---|
| std::codecvt_base::ok | Output characters in[xbuf, xbuf_end) to the file, and fail if output fails. At this point ifpbase()!= pptr() andpbase()== end are bothtrue (which meansxbuf is not large enough for even one external character), then increaseXSIZE and repeat from the beginning. |
| std::codecvt_base::partial | Output the converted external characters in[xbuf, xbuf_end) to the file, and repeat using the remaining unconverted internal characters in[end, pptr()). If output fails, fail (without repeating). |
| std::codecvt_base::noconv | Output characters in[pbase(), pptr()) to the file. |
| std::codecvt_base::error | Fail. |
3) Establishes anobservable checkpoint. | (since C++26) |
Contents |
| ch | - | the character to store in the put area |
Traits::not_eof(ch) to indicate success orTraits::eof() to indicate failure.
Ifa_codecvt.always_noconv() returnstrue, the call toa_codecvt.out() may be skipped.
| This section is incomplete Reason: no example |
[virtual] | writes characters to the associated output sequence from the put area (virtual protected member function of std::basic_streambuf<CharT,Traits>)[edit] |
[virtual] | reads from the associated file (virtual protected member function)[edit] |