On 03/01/2011 12:14 PM, Kevin P. Fleming wrote: > On a slightly related note... I've seen a couple of pages (but not the > GCC manual's 'inlining' page) mention that it's possible for virtual > member functions to be inlined if they are inlinable (either defined in > the class declaration or the function declaration is visible and marked > 'inline') and the call to them is a 'direct virtual function call'. This > last term doesn't make any sense to me, and based on my understanding of > vtables I don't see how a virtual member function could *ever* be > inlined unless it was called in a non-virtual fashion (i.e. calling it > as "Foo::bar()" when Foo is the class making the call or one of its > bases). In any other situation, the compiler cannot know at compile time > which member function would actually be called. Does this sound like a > correct statement? Consider new Foo()->bar(); Andrew.