static assert(false, T!()); template T() { const char[] T = "foo"; static assert(false, 2); } output: t.d(6): static assert 2 it would be nice to at least see the assert on 1 even if the message can't be generated.