What is the difference in a base hook and a member hook in Boost::Intrusive library and when is one better to use then the other?
I've read the boost documentation, but its not that explanatory.
What is the difference in a base hook and a member hook in Boost::Intrusive library and when is one better to use then the other?
I've read the boost documentation, but its not that explanatory.
As far as I can tell it is a matter of style and object-oriented design. Base hooks intrude upon the inheritance hierarchy, necessitating an extra public
parent class and possibly forcing multiple inheritance upon the design. Using member hooks allows the programmer to treat an object as having a has-a
relation with a container, rather than an is-a
relation with container membership.