Accessing __FILE__ and __LINE__ of caller in combination with varargs?

pineapple via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 15 13:43:08 PDT 2016


I've written a very handy assertf method whose signature looks 
like this:

void assertf(Args...)(lazy bool condition, in string message, 
Args args)

But I'd also like to access the caller's file and line to use 
them in constructing a thrown AssertError, and I'm stumbling on 
how I can get that information where it needs to go. Help?



More information about the Digitalmars-d-learn mailing list