Re: single virtual inheritance

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

 



Am Sonntag 13 Juli 2008 schrieb - -:

> What is the cost, if any, of inheriting a virtual base class only once
> (not using multiple inheritance) vs. non-virtual single inheritance?

The cost is a single pointer redirection - the same as between 
using  "some_type some_var" and  "some_type& some_var".

But the gain is extensabitlity and maintainabiltiy. I have seen the neibouring 
team doing a one week 5 person refactoring run because they dicovered the 
value of  virtual inheritance to late.

Always remember: there is a cost of not using a feature as well - and it might 
be your weekend not beeing at home but doing refactoring.

Martin
-- 
Martin Krischik
mailto://krischik@xxxxxxxxxxxxxxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part.


[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