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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
publicparent class and possibly forcing multiple inheritance upon the design. Using member hooks allows the programmer to treat an object as having ahas-arelation with a container, rather than anis-arelation with container membership.