From: Ames Andreas (Andreas.Ames_at_[hidden])
Date: 2007-03-30 14:02:04
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Daniel Walker
> Sent: Friday, March 30, 2007 6:14 PM
> Subject: Re: [boost] [mpl] has_template_xxx patch
> On 3/30/07, Guillaume Melquiond
> <guillaume.melquiond_at_[hidden]> wrote:
> > Quoting Daniel Walker:
> > > static const int size = sizeof(f<T>(0, 0));
> > At first sight, I would have said that it does. But on
> further reflexion, it
> > probably does not, as there is no deduction from the argument types.
> > But if you
> > use f((T*)0,0) instead, then it should work.
> Your right. Excellent!
> This doesn't work on MSVC 8.0, however. I believe it doesn't work
> using template-based SFINAE on MSVC as well. If I can't work around
> it, would it be ok if I exclude MSVC from tests for has_template_xxx
> rejecting types containing member templates with the correct name but
> incorrect arguments? Everything else works on VC 8.0 and VC 7.1. If
> the bug is fixed in MSVC or if someone else comes up with a work
> around, we can then include MSVC in these tests.
After rereading 14.8.2 [temp.deduct] I'd say, both forms are compliant. Rejecting one (with explicit template arguments) and accepting the other should definitely be a bug. At least, I can't see how both forms would differ regarding SFINAE.
-- 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