Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template get_parent_from_member

boost::intrusive::get_parent_from_member

Synopsis

// In header: <boost/intrusive/parent_from_member.hpp>


template<typename Parent, typename Member> 
  Parent * get_parent_from_member(Member * member, 
                                  const Member Parent::* ptr_to_member);

Description

Given a pointer to a member and its corresponding pointer to data member, this function returns the pointer of the parent containing that member. Note: this function does not work with pointer to members that rely on virtual inheritance.


PrevUpHomeNext