[GSoC] __enable_shared_from_this_helper

Fan You youfan.noey@gmail.com
Mon May 4 02:39:00 GMT 2015


got it!

Thanks

2015-05-03 22:22 GMT-04:00 Tim Shen <timshen@google.com>:
> On Sun, May 3, 2015 at 7:17 PM, Tim Shen <timshen@google.com> wrote:
>> Notice that the real function body of the matched function is defined
>> in std::enable_shared_from_this in shared_ptr.h.
>
> The reason is __p, whose type is A*, is implicitly converted to
> std::enable_shared_from_this<A>*, since the latter is a public base
> class of the former.
>
> I don't know how exactly variadic parameter list are resolved, but
> based on the result, the second version (who takes an implicit
> converted base pointer) won the resolution.
>
> You may read the standard to know more about overloading resolution,
> but I don't think that's necessary.
>
>
> --
> Regards,
> Tim Shen



More information about the Libstdc++ mailing list