Skip to main content

All Questions

27 votes
5 answers
6k views

C++: Should class own or observe its dependencies?

Say I have a class Foobar that uses (depends on) class Widget. In good ol' days, Widget wolud be declared as a field in Foobar, or maybe as a smart pointer if polymorphic behavior was needed, and it ...
el.pescado - нет войне's user avatar