I have following code:
Tools::Logger.Log(string(GetLastError()), Error);
GetLastError() returns a DWORD a numeric
As all guys here suggested, implementation will use stringstream.
In my current project we created function
template
std::string util::str::build( const T& value );
to create string from any source.
So in our project it would be
Tools::Logger.Log( util::str::build(GetLastError()) );
Such usage of streams in the suggested way wouldn't pass my review unless someone wrap it.