Instead, you want:
* A pretty-printer library (possibly single-header) * A function for obtaining the typename; see:
https://stackoverflow.com/q/35941045/1593077 https://stackoverflow.com/a/56766138/1593077 for a constexpr approach.
* A logging library with log levels (so that you don't necessarily need to recompile to enable these outputs) * A stack trace printing library
When you have that, such a macro becomes nearly trivial. Oh, yeah, and - drop the silly ANSI coloring.
Instead, you want:
* A pretty-printer library (possibly single-header) * A function for obtaining the typename; see:
and it won't hurt to have:* A logging library with log levels (so that you don't necessarily need to recompile to enable these outputs) * A stack trace printing library
When you have that, such a macro becomes nearly trivial. Oh, yeah, and - drop the silly ANSI coloring.