C++ guys hate static_if?

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Mar 14 11:06:43 PDT 2013


On Thu, Mar 14, 2013 at 01:51:23PM -0400, Andrei Alexandrescu wrote:
> On 3/14/13 1:48 PM, H. S. Teoh wrote:
> >I don't agree. Phobos is a prime example. Does Phobos have unittests?
> >Yes, and lots of them. Does it still have non-compilable template
> >instantiations? Yes, because unittests can't cover all possibilities --
> >there are too many possible combinations of template arguments. There
> >are bound to be untested combinations which don't work but we're unaware
> >of.
> 
> If you found a few, that would be great. I don't think you'll have
> an easy time.
[...]

It's easier than you think. I've stumbled across a few before. All you
have to do is to start instantiating things with various combinations of
const, immutable, class-based ranges instead of structs, etc., and all
those little corner cases will start showing up.


T

-- 
Never wrestle a pig. You both get covered in mud, and the pig likes it.


More information about the Digitalmars-d mailing list