Boost logo

Boost :

Subject: Re: [boost] [Root Pointer] Seeking a Review Manager
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-04-03 20:53:34

On 04/03/2016 08:32 PM, Edward Diener wrote:
> I still am not getting what root_ptr<someType> is. Is it a replacement
> for shared_ptr ?

There is no performance loss in using root_ptr/node_ptr over shared_ptr
so therefore yes it is a replacement for shared_ptr/weak_ptr.

> What is node_ptr<someType> ? How does a root_ptr relate
> to a node_ptr ?

root_ptr has a 1 to many relationship with node_ptr which means only 1
root_ptr should be used to refer to multiple node_ptrs. Just like:
- a container (1 root with multiple nodes) or
- the implementation of a webpage in C++ (1 root per page with mutliple
HTML elements)

> Can there be numerous root_ptrs and node_ptrs for any
> given 'someType' ?

Yes a class can have multiple roots to some instantiations of the class
and each instantiation can have numerous number of node_ptrs contained

> What root_ptr and node_ptr syntax solves cyclic
> dependencies and how does this work ?

I'll document that.

> These are some of the basic questions introductions and/or overviews
> should be explaining to prosepctive users of your library, preferably
> with good examples illustrating the explanations. You know these things
> but I do not see how you can expect others to know them unless you are
> willing to explain them in your doc using understandable paragraphs and
> sentences that communicate what you know.

Thanks for your questions, it helps me a lot improving the documentation.

Boost list run by bdawes at, gregod at, cpdaniel at, john at