Boost logo

Boost Users :

From: goochrules! (goochrules_at_[hidden])
Date: 2004-08-13 14:37:34


On Fri, 13 Aug 2004 01:52:05 -0700, Victor A. Wagner Jr.
<vawjr_at_[hidden]> wrote:
> std::list<boost::shared_ptr<tree> > forest;
> of course you'll have to allocate (new) them before putting their pointers
> in the list,
> but that's not a huge issue.

Not at all, so long as I use explicit temopries when calling new as
the docs say.

I've found I also have to change "iter->grow();" to
"(*iter)->grow();", but I think i've found a mechanism to solve this.
I create a wrapper around the iterator whose operator* and operator->
returns a value_type& (i.e., *iter). The modified code is attached,
any suggestions?

-- Matthew Peltzer
-- goochrules_at_[hidden]




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net