I'm working with some code today, and I saw:
extern std::locale g_classicLocale;
class StringStream : public virtual std::ostringstream
{
public:
StringStream() { imbue(g_classicLocale); }
virtual ~StringStream() {};
};
Then I came in face of imbue
. What is the purpose of the imbue
function in C++? What does it do? Are there any potential problems in using imbue
(non-thread safe, memory allocation)?