On Friday, 19 May 2017 at 21:01:09 UTC, Jonathan M Davis wrote:


Wait, what? Doesn't D specifically _not_ have SFINAE? You can use static if to test what compiles, and the branch whose condition compiles is then the on that gets compiled in, which kind of emulates what you'd get with SFINAE, but that's not really the same as SFINAE, which just outright picks the the template specialization which happens to compile while letting the others that don't compile not generate errors. D complains when you have multiple, matching templates. So, what do you mean that D has SFINAE?

- Jonathan M Davis

If a template does trigger a static assert,
that static assert is ignored if there is another template in the overload set that could match.

Reply via email to