[GSoC] __enable_shared_from_this_helper
Tim Shen
timshen@google.com
Mon May 4 02:22:00 GMT 2015
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