protected virtual member function
<fstream>

std::basic_filebuf::imbue

void imbue (const locale& loc);
Imbue locale
Specifies the locale object to be used for conversions on input/output operations performed on the file stream buffer.

If loc is not the same locale as currently used by the file stream buffer, either the internal position pointer points to the beginning of the file, or its encoding is not state-dependent. Otherwise, it causes undefined behavior.

Imbuing a different locale may require the conversion of previously converted characters.

This virtual member function overrides the inherited member basic_streambuf::imbue, called by member pubimbue to notify a change in imbued locale.

Note that the imbued locale object is kept by the basic_streambuf base and shall not change between calls to this function.

Parameters

loc
The locale object being imbued.

Return Value

none

Data races

Modifies the basic_filebuf object.
Concurrent access to the same file stream buffer object may introduce data races.

Exception safety

Basic guarantee: if an exception is thrown, the file stream buffer is in a valid state.

See also