
Felipe Magno de Almeida <felipe.m.almeida@gmail.com> writes:
On 12/10/05, David Abrahams <dave@boost-consulting.com> wrote:
[snip]
That isn't really a complete solution:
struct Base {}; struct Derived : Base {}; struct Bottom : Derived {};
int f(shared_ptr<Base>); // #1 int f(shared_ptr<Derived>); // #2
shared_ptr<Bottom> x(new Bottom); int y = f(x); // Should call #2, but is ambiguous
will still fail, and there's not really any way to make it work.
But at least completely unmatchable choices wont get in the way, turning a completely legitimate call an ambigous one.
I know. I suggested the SFINAE thing to Peter several months ago. I'm just pointing out that it has serious limitations. -- Dave Abrahams Boost Consulting www.boost-consulting.com