From: Ames Andreas (Andreas.Ames_at_[hidden])
Date: 2007-03-30 11:24:44
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Daniel Walker
> Sent: Friday, March 30, 2007 4:57 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] [mpl] has_template_xxx patch
> That's fine. I'm just thinking about test cases. Is the error standard
> compliant? Should I write tests for this case and excluded them for
> current compiler releases anticipating that at some point in the
> future they will accept this? Or is this mandated by the standard, and
> I should mention it in the documentation as a caveat?
According to "C++ Templates" (Vandevoorde/Josuttis) SFINAE is there to make overloading of template functions applicable. IMHO, it means that template argument deduction must be successful and that only failures to create valid types from the deduced arguments (by substituting function call parameters by them) are prevented from erroring out. In your case, the argument deduction already fails, because there is no type foo<T,U>.
-- Andreas Ames | Programmer | Comergo GmbH | ames AT avaya DOT com Sitz der Gesellschaft: Stuttgart Registergericht: Amtsgericht Stuttgart - HRB 22107 Geschäftsführer: Andreas von Meyer zu Knonow, Udo Bühler, Thomas Kreikemeier
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk