public member function
<streambuf> <iostream>


locale pubimbue (const locale& loc);
Imbue locale
Associates loc to the stream buffer.

The function also calls its protected virtual member function imbue to inform derived classes of the change.


locale object to imbue to the stream buffer as its new associated locale.

Return Value

The locale object associated to the stream buffer before the call.

Data races

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

Exception safety

Basic guarantee: if an exception is thrown, the stream buffer is in a valid state (this also applies to standard derived classes).

See also