Namespaces
Variants
Views
Actions

std::basic_filebuf::overflow

From cppreference.com
< cpp‎ | io‎ | basic filebuf
Revision as of 06:53, 26 March 2013 by 69.191.176.31 (Talk)

protected:
virtual int_type overflow ( int_type c = Traits::eof() );

Behaves like the base class std::basic_streambuf::overflow, except that to write the data from the put area to the associated character sequence (to the file), first uses codecvt::out() of the imbued locale to convert the characters into external (possibly multibyte) representation, stored in a temporary buffer (allocated as large as necessary), then uses file I/O to copy all fully-converted bytes into the file.

If the conversion fails with std::codecvt_base::error, returns Traits::eof() without attempting any output.

If the associated file is not open (is_open()==false), returns Traits::eof() before doing anything.

Contents

Parameters

(none)

Return value

Traits::not_eof(c) to indicate success or Traits::eof() to indicate failure.

Example

See also

Template:cpp/io/basic streambuf/dcl list overflowTemplate:cpp/io/basic filebuf/dcl list underflow