
----- Original Message ----- From: "Dan Walters" <dan683@googlemail.com> To: <boost@lists.boost.org> Sent: Sunday, May 02, 2010 12:28 PM Subject: [boost] [paired ptr] Proposing a new smart pointer object formanaging bidirectional relationships between objects Dear all, I have been working on a proposal for a useful utility for managing non hierarchal, bi-directional relationships between objects and as a useful tool in object composition. This utility is in the form of a type of templated smart pointer that can connect to one single other pointer and manage the relationship between the two pointers. This paired_ptr object is intended for use as a member of (or at least contained within) a user defined object and is conceptualized from the needs of object composition. _______________________________________________ There is also Boost.Bimap. Even if this is more general than what you are trying to achieve, maybe it is worth reading the documentation. The advantage is that the CCat and the CDog classes can be independent one of each other. _____________________ Vicente Juan Botet Escribá http://viboes.blogspot.com/