No code coverage for templated classes / methods?

Sean Kelly sean at
Sun Jul 22 10:25:39 PDT 2007

Matthias Walter wrote:
> Hello,
> sorry for reposting this but I got no answer some time ago:
> I've implemented an algorithm in D, using templates to achieve different
> precisions (32bit, 64bit and arbitrary precision using GMP in the future).
> Sadly, code coverage does not work for those (I've used Digital Mars D Compiler
> v1.014) - all lines in the templated classes don't count as lines with
> executable code :( Is it possible to change this behavior?

If I had to guess, I would say this is related to the fact that template 
code cannot be debugged at the moment either.  It's likely that certain 
debug information isn't currently being generated for template code.

> Any ideas whether I'm doing something wrong or this is not possible at all?

It's possible, just likely not supported yet.


More information about the Digitalmars-d-learn mailing list