C++ guys hate static_if?

Jonathan M Davis jmdavisProg at gmx.com
Thu Mar 14 15:54:30 PDT 2013


On Thursday, March 14, 2013 15:18:56 Andrei Alexandrescu wrote:
> On 3/14/13 3:04 PM, H. S. Teoh wrote:
> > I found (and fixed!) a number of missed combinations in std.algorithm:
> > transient ranges, joiner() not using .save on forward ranges, same bug
> > in transposed(), transposed crashing on jagged range of ranges, etc..
> 
> I think you're right but only in part; there may be a bit of a
> confusion. There's pure semantic checking such as forgetting to use
> .save that can't be detected statically. Then there's code that e.g.
> should work for forward ranges but has only been tested with arrays.

Those tend to be somewhat common, though we've been cutting down on them.

> My question was referring to code that has sheer typos that are
> mechanically detected, which are present in code that has never ever
> been instantiated. I do recall we found a few, but I think that
> illustrates a problem with the process, not the language.

Those tend to be _very_ rare. I wouldn't say that we've _never_ seen one In 
Phobos, but I sure don't remember one. And that's something that 100% code 
coverage catches easily. It's the semantic issues where it doesn't.

- Jonathan M Davis


More information about the Digitalmars-d mailing list