On 3/14/13 4:57 PM, Timon Gehr wrote:
On 03/14/2013 06:51 PM, 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.
Andrei
Challenge accepted. Clearly the Phobos developers do not instantiate
their templates before shipping them. :o)
The following breaks most of std.range, and most of std.algorithm could
likely be broken too, but I am too lazy to investigate.
[snip]
Nice point. The problem is an immutable TrollFace should not qualify
pass the range tests. This could happen if there was a similar bug in a
concept definition. So your argument does not move the ball on concepts
vs static if.
Andrei