std.logger
Jonathan M Davis
jmdavisProg at gmx.com
Fri Aug 23 12:16:05 PDT 2013
On Friday, August 23, 2013 19:21:33 Gary Willoughby wrote:
> I don't think you can bloat a simple logger too much with
> templates. It's a pretty simple framework.
If __FILE__ and __LINE__ are template arguments to a logging function rather
than function arguments (and you can't make __FILE__ and __LINE__ default
function arguments if the function is variadic as it would have to be to
support format strings), then you get a new template instantation every single
time that you call the function, unless you call it more than once on the same
line (which you're unlikely to ever do).
I want to think that there's a way to handle this if you get clever, but I
can't think of a clever way to get around the problem at the moment.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list