Dominance (C++)
From Wikipedia, the free encyclopedia
For other uses, see Dominance.
| This article is an orphan, as few or no other articles link to it. Please introduce links to this page from related articles; suggestions may be available. (February 2009) |
In the C++ programming language, dominance implies a specific behaviour of symbol disambiguation in virtual inheritance. Consider the following example:
class Parent { public: virtual void function(); }; class Child1 : public virtual Parent { public: void function(); }; class Child2 : public virtual Parent { }; class Grandchild : public Child1, public Child2 { public: Grandchild() { function(); } };
In the Grandchild call to function(), Child1::function is implied, because Child1 is derived from Parent and thus Child1::function "dominates" Parent::function.
[edit] See also
| This computer programming-related article is a stub. You can help Wikipedia by expanding it. |