On 04/03/2016 01:15 PM, Phil Bouchard wrote:
On 04/03/2016 11:15 AM, Larry Evans wrote:
Unify is somewhat clarified by:
http://philippeb8.github.io/root_ptr/root_ptr/rationale.html#root_ptr.ration...
But that raises another question. The pair of side-by-side diagrams suggest that when the lower non-inherited node_ptr acquires a pointer to the upper non-inherited node_ptr, then the "corresponding" node_proxy's likewise acquire similar pointers. Now what happens when the direction is reversed? Is there then a cycle between the node_proxy's?
Good question. There can be no cycle between node_proxy's because it uses an intrusive list. You can rearrange intrusive list elements however you want and you will never have a cycle.
Could you please explain how an intrusive list prevents cycles. I'm probably misinterpreting what the arrow means from the lower node_proxy to the upper node_proxy. I was interpreting that to mean that node_proxy contained some node_proxy* member variable. However, looking at the code here: https://github.com/philippeb8/root_ptr/blob/master/include/boost/smart_ptr/r... and searching for node_proxy, I see no such member variable pointer. Could you further explain the meaning of the arrow in that #root_ptr.rationale.union diagram? -regards, Larry