On 2015-03-18 15:27:03 +0000, Daniel Kozák via Digitalmars-d-learn said:

You probably does not need mixins:

void log(string file = __FILE__, size_t line = __LINE__, T...)
(T variadic_arg) {
    some_fun(variadic_arg[0],  file, line, variadic_arg[1 .. $]);
}

Hi, ha, forgot about default arguments. Great that this works and take the file & line number where the tempate function is used.

Thanks.

--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

Reply via email to