Re: inlining a virtual function

2008-12-09 Thread Sebastian Redl
Marco Correia wrote: hi, The following is a simplification of my problem: struct Base { virtual void func() = 0; }; struct Derived : Base { inline void func() {...} }; Derived& d = ...; d.func(); This last call is not being inlined. Is this normal? Yes. The compiler cannot know that d doesn'

Re: inlining a virtual function

2008-12-09 Thread Ian Lance Taylor
Marco Correia <[EMAIL PROTECTED]> writes: > The following is a simplification of my problem: > > struct Base { virtual void func() = 0; }; > > struct Derived : Base { inline void func() {...} }; > > Derived& d = ...; > d.func(); > > This last call is not being inlined. Is this normal? (As I said m