I’m
using Boost.Format as a simple way to create strings to pass to exception
constructors and primitive logging output during debugging (Windows’
OutputDebugString).
I see that
the format object can be inserted into a stream, easily. But, with arguments,
it’s awkward to convert it to a string -- you need extra parens around
the whole thing.
Is there
some good reason why there is no implicit conversion to string? E.g.
string
message= boost.format(“blah”) % argument % errorcode;
OutputDebugStringA
(message.c_str());
throw
std::runtime_error (message);
Or, is there
some simple way that I’m missing?
Thanks,
--John