@ne555 has a point. Item #34 in C++ Coding Standards by Sutter & Alexandrescu says to prefer containment to inheritance. Yes, it may mean writing a bit more code, but inheritance is the second tightest form of coupling in C++, and it is generally accepted that tight coupling should be avoided.