This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GSoC] __enable_shared_from_this_helper


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]