Boost logo

Boost :

From: Spencer Collyer (spencer_at_[hidden])
Date: 2006-04-29 03:15:00


On Fri, 28 Apr 2006 08:25:57 +0100, Spencer Collyer wrote:
> On Thu, 27 Apr 2006 08:41:58 -0700, Sohail Somani wrote:
> > > The option I came up with was to have a set_limit function on
> > > the bounds
> > > policy which you would call to define the limits at run time. The
> > > only reason I haven't gone ahead and done the work to implement
> > > run-time limits as yet is because I'm still not sure about the
> > > answers to a few questions:
> >
> > I think you can have the sparse array implementation have an
> > overloaded constructor that takes an instance of the policy. With a
> > set_limit you may end up having invalid arrays for some length of
> > time.
> I think I see what you're getting at here, but given that the policies
> are used through inheritance I'm not sure it is feasible in my class.

Scratch that last comment. Thinking about it some more this morning I
think I now see what you are getting at. We could have a constructor
taking (a reference to) an object of the bounds policy class, which
simply passes that object to the class's constructor in the initializer
list. It's so simple, I don't know why I didn't think of it before.

I'll add it to the class interface.


<<< Eagles may soar, but weasels don't get sucked into jet engines >>>
8:08am up 41 days 19:41, 23 users, load average: 0.04, 0.59, 0.88
Registered Linux User #232457 | LFS ID 11703

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