I\'m trying to write a macro that would allow me to do something like: FORMAT(a << \"b\" << c << d), and the result would be a string -- the s
FORMAT(a << \"b\" << c << d)
Here's a working solution:
#define FORMAT(items) \ ((std::ostringstream&)(std::ostringstream() << std::dec << items)).str()
I don't quite understand the behavior of the first argument.