Boost logo

Boost :

From: Daniel Walker (daniel.j.walker_at_[hidden])
Date: 2007-03-30 12:13:41


On 3/30/07, Guillaume Melquiond <guillaume.melquiond_at_[hidden]> wrote:
> Quoting Daniel Walker:
> > OK, thanks for the help. I was trying to simplify my code to replicate
> > the error I'm getting, and I may have gone to far. Can you tell me if
> > the following contains a substitution?
>
> > 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.

Thanks!
Daniel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk