
On Dec 23, 2008, at 9:20 AM, Neal Becker wrote:
Interesting example. IIUC, though, what I need is run-time bounds and the example is compile-time.
It is runtime in that it's a static field which you could change at runtime, which is shared by all uses of that bounds type. But presumably you would want change_*_bound to recheck all items in the container to make sure that the new bound is valid, and there is no sensible way to do that with this technique. (I can think of some ridiculous ways.) Clearly there is still plenty of room for generalization of the concepts introduced by this library: associating constraints with groups or classes (English not C++ definition) of values is going to be way more natural and efficient. Gordon