Passing variadic template parameters AND default call site __FILE__, __LINE__ template parameters.
Jonathan M Davis
newsgroup.d at jmdavisprog.com
Wed May 28 11:32:53 UTC 2025
On Wednesday, May 28, 2025 5:04:06 AM Mountain Daylight Time realhet via Digitalmars-d-learn wrote:
> I've found a way to eliminate !() by using a function:
Just FYI, you almost never want to instantiate a template with a file and
line number anyway, because that means that every single template
instantiation is going to be unique, and that's going to mean a lot of
template bloat.
Once in a blue moon, you do need the file or line number to be a template
argument, but it's pretty much always better to make them function arguments
if you can.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list