
9 Feb
2009
9 Feb
'09
4:12 a.m.
Hi,
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: http://lists.boost.org/boost-users/2008/12/42959.php 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. Regards, Robert