Programming for std.log

Adam D. Ruppe destructionator at
Sun Feb 12 12:25:17 PST 2012

On Sunday, 12 February 2012 at 20:18:13 UTC, Jose Armando Garcia 
> Is there anyway that dmd can tell me why a template is being
> instantiated? Something like like:

You do get that if a static assert fails. One of the first
things I do when I update dmd is to hack up the source
to a bunch of phobos to do something like

if(!__traits(compiles, instantiation_here))
  static assert(0);

just because that error message is infinitely more helpful.

I don't know about the std.algorithm one, but I do this
in std.conv a lot and it is good there because there's
a to!() entry point that then calls toImpl, and the to!()
one can be easily static asserted.

More information about the Digitalmars-d mailing list