C++ guys hate static_if?

Walter Bright newshound2 at digitalmars.com
Thu Mar 14 12:42:34 PDT 2013


On 3/14/2013 8:05 AM, monarch_dodra wrote:
> Having to instantiate a template just to check to make sure it is semantically
> correct is a huge pain.

I don't understand that sentiment. (You're also mistaken in that only syntactic 
correctness can be tested in an uninstantiated template, not semantic correctness.)

It means you're willing to ship code that is syntactically correct, but is not 
necessarily semantically correct and is completely untested at runtime.

This is not a best practice at all.

Also, dmd's -cov coverage testing will check for you what parts of templates 
were instantiated and what parts never were.


More information about the Digitalmars-d mailing list