4 ms·
Source location is so much more than that macro!! - it has file name, line number, and char number! That already makes the number of characters more similar if
by sesuximo 6y ago
Source location is so much more than that macro!!
- it has file name, line number, and char number! That already makes the number of characters more similar if that’s your metric
- it can be forwarded/passed around. It’s much harder to pass macros around
- it can easily capture the caller’s location rather than the location of the macro
- PaulDavisThe1st 6y agoSince #define will still exist, I'd suggest #define __WHERE__ std::source_location::current() :)