Variable arguments with file and line information?

Namespace rswhite4 at googlemail.com
Sat Nov 16 14:57:34 PST 2013


Hi.
Is it possible to write something like that?
----
void error(Args...)(string msg, Args args, string file = 
__FILE__, size_t line = __LINE__) { ... }
----
?
Currently not, but how could it be done? I wont like to write:
----
error(format(msg, args));
----

Thanks in advance. :)


More information about the Digitalmars-d-learn mailing list