3 ms·
If you make the lambda take the source location as a default parameter initialized to `std::source_location::current()` (which is the typical usage) then the de
by eklitzke 3y ago
If you make the lambda take the source location as a default parameter initialized to `std::source_location::current()` (which is the typical usage) then the default argument is created in the scope of the caller, so it would expand to the name of the function (and line number, etc.) calling the lambda rather than the lambda itself.
If you want to literally capture the name of the lambda and the line number in the lambda you'd create the source_location within the lambda instead.