![]() |
Home | Libraries | People | FAQ | More |
boost::intrusive::get_parent_from_member
// In header: <boost/intrusive/parent_from_member.hpp> template<typename Parent, typename Member> const Parent * get_parent_from_member(const Member * member, const Member Parent::* ptr_to_member);
Given a const pointer to a member and its corresponding const pointer to data member, this function returns the const pointer of the parent containing that member. Note: this function does not work with pointer to members located in a virtual base of Parent, as the distance between the parent and the member is not a compile-time constant (the parent can have virtual bases, as long as the member is not located in one of them).