On 09/20/2011 12:43 PM, Roberto Agostino Vitillo wrote:
- if (DECL_VINDEX (fn)&& ! (flags& LOOKUP_NONVIRTUAL)
- && resolves_to_fixed_type_p (instance, 0))
+ if (DECL_VINDEX (fn)&& ((! (flags& LOOKUP_NONVIRTUAL)
+ && resolves_to_fixed_type_
When calling a final virtual function or a virtual function that belongs to a
final class there is no need for a virtual lookup. E.g.:
struct A final
{
virtual void foo ()
{
}
};
struct B
{
virtual void foo () final
{
}
};
void fun(A* a, B* b)
{
a->foo();
b->foo();
}
with this