$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David Abrahams (dave_at_[hidden])
Date: 2005-12-10 12:04:12
Felipe Magno de Almeida <felipe.m.almeida_at_[hidden]> writes:
> On 12/10/05, David Abrahams <dave_at_[hidden]> 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