Moon2 wrote:
A virtual class would be a key in solving the diamond problem with multiple
inheritance, see
http://en.wikipedia.org/wiki/Diamond_problem
Virtual inheritance (there's no such thing as a virtual class, but we
all know what's meant by that term) MIGHT be a way to approach solving
such a problem if the problem arose because of a design error.
Unfortunately, there's a great deal of folklore about the "dreaded
diamond", etc. that's based on the assumption that deriving from the
same base through multiple paths must be an error. It's not necessarily so.
--
-- Pete
Roundhouse Consulting, Ltd. (
www.versatilecoding.com)
Author of "The Standard C++ Library Extensions: a Tutorial and
Reference." (
www.petebecker.com/tr1book)