"SFINAE is Evil"
Russell Lewis
webmaster at villagersonline.com
Fri Mar 21 06:34:55 PDT 2008
Bill Baxter wrote:
> How do I know if I'm using SFINAE or not? :-)
>
> Seriously, I might be using it. I'm not sure. I'm not sure how to go
> about checking. And that in and of itself seems like an undesirable
> quality.
Indeed!
> I will say that I have most definitely been bitten by errors that came
> from failure to instantiate the template I thought I was instantiating
> (most often due to IFTI failures). These things can usually be debugged
> by switching the code I suspect to specify all template arguments. Then
> I'll get the sensible error telling me why it doesn't match.
Tuples hurt you here, because if you specify some Tuple template as a
"last resort" template, you can end up using it for things you thought
you'd handled. Or, at least, I think that maybe that's the case...with
SFINAE, it's hard to know for sure.
More information about the Digitalmars-d
mailing list