Boost logo

Boost :

Subject: Re: [boost] [constrained] constrained_vector
From: Robert Kawulak (robert.kawulak_at_[hidden])
Date: 2009-02-08 23:12:22


> From: Neal Becker
> I'm interested in something like constrained, but applied to a vector of
> values. The case I'm interested in is a homogeneous vector of bounded int
> values, with bounds set at runtime.
> It is trivial to have a vector<bounded<int> >, but this would not be space
> efficient in the case where the policies, bounds on all the values are the
> same.

Maybe you could use the policy described here:
It will let you set the bounds at runtime, but not change them once any object
using this policy is created. However, it will have no space overhead on the
individual objects.


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