Re: How to resolve heap object`s virtual function call at compile time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



shark <cplusplus09@xxxxxxxxx> writes:
> Hi, everyone,
>     I`ve a question about inlining virtual functions.
>     G++ could inline those object`s virtual function which are allocated
> on stack because they have type informations,  but how about objects
> allocated on the heap? Can i force add a type info to it and let g++
> resolve the virtual function call at compile time (not through vtables
> ).

Forget about casts and try

p->ClassName::func();

-- 
Sergei.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux