On 02/12/2012 10:43 PM, Jose Armando Garcia wrote:
On Sun, Feb 12, 2012 at 6:25 PM, Adam D. Ruppe
<destructiona...@gmail.com> wrote:
On Sunday, 12 February 2012 at 20:18:13 UTC, Jose Armando Garcia wrote:
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);
Very helpful advice! I narrowed it down to:
$ cat format_spec.d
import std.format;
void main() {
static assert(is(Unqual!char == char));
FormatSpec!char spec;
}
../dmd/src/dmd -w format_spec.d
format_spec.d(4): Error: static assert (is(Unqual!(char) == char)) is false
This is suppose to be true, no?
Thanks,
-Jose
No, it should fail. You forgot to import std.traits.