This is our ideal inheritance hierarchy:
class Foobar;
class FoobarClient : Foobar;
class FoobarServer : Foobar;
class WindowsFoobar : Foobar;
class UnixF
You're in C++, you should get friendly with templates. Using the template-argument-is-a-base-class pattern, you'll not need any multiple inheritance or redundant implementations. It will look like this:
class Foobar {};
template class UnixFoobarAspect : public Base {};
template class WindowsFoobarAspect : public Base {};
template class FoobarClientAspect : public Base {};
template class FoobarServerAspect : public Base {};
typedef UnixFoobarAspect/*this whitespace not needed in C++0x*/> UnixFoobarClient;
typedef WindowsFoobarAspect > WindowsFoobarClient;
typedef UnixFoobarAspect > UnixFoobarServer;
typedef WindowsFoobarAspect > WindowsFoobarServer;
You might also consider using the curiously recurring template pattern instead of declaring abstract functions to avoid virtual function calls when the base class needs to call a function implemented in one of the specialized variants.