News for hackers. Stuff that matters.
Re:Is the preprocessor still needed in C++? (2017) by sesuximo on Sunday December 06, 2020 @10:33AM (#25324114)
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

Re:Is the preprocessor still needed in C++? (2017) by PaulDavisThe1st on Sunday December 06, 2020 @12:22PM (#25324929)
Since #define will still exist, I'd suggest

   #define __WHERE__ std::source_location::current()
:)