public member function
<streambuf> <iostream>

std::basic_streambuf::getloc

locale getloc() const;
Get current locale
Returns the locale object currently associated to the stream buffer.

If the member function pubimbue has already been called on this stream buffer, the value returned is the one set by that function, otherwise the current global locale (as if constructed by calling locale()) is returned.

Parameters

none

Return Value

The locale object currently associated to the stream buffer.

Data races

Accesses the stream buffer object.
Concurrent access to the same stream buffer object may cause data races.

Exception safety

Strong guarantee: if an exception is thrown, there are no changes in the stream buffer.

See also