jeudi 27 juillet 2017

What is the best way to implement the adaptor pattern in c++

I have seen that it is possible to use inheritance, such as:

class A {
};

class Legacy{
};

class B : public A, private Legacy {
};

But it is weird to me to inherit public and private from two different classes.

Aucun commentaire:

Enregistrer un commentaire