How can I define a macro that allows me to "dump" multiple variables to my terminal? e.g.
DUMP(foo, bar, baz);
Would print:
my_file.cpp:100: foo="value of foo", bar="barval", baz="baz's val"
I've got it working for a single arg:
#define DUMP(val) std::cerr << __FILE__ << ":" << __LINE__ << ": " << #val << "=" << (val) << std::endl
And I know I can make a variadic macro by defining it like DUMP(args...)
but then I don't know how to expand that out properly into an ostream.