2 ms·
Im not sure why exsctly you would prefer this over just a few overloads of "operator<<"? Why is it all macros? That seems ancient. Again, you could do this mor
by lionkor 3y ago
Im not sure why exsctly you would prefer this over just a few overloads of "operator<<"?
Why is it all macros? That seems ancient. Again, you could do this more cleanly with concepts and a templated operator<<, which then also supports more than just std::clog (fmt/std::format will happily use operator<< for example)
- toxik 3y agoIt’s macros because it dumps the expression. There is a non macro variant.
- philip82148 3y agoThe macro version is for printing the variable's name. But it also has a function version. Why this library has some other macros is written in my new comment. Also, (though I hadn't mentioned competitive programming before my new comment,) as far as competitive programming is concerned, I prefer `dump()` to operator<<, which has more letters/types(`cout << variable << endl;`).