From: Robert Kawulak (kawulak_at_[hidden])
Date: 2005-10-20 16:09:58
> From: Neal Becker
> I'm more
> interested in bound specified at runtime. I believe (without
> proof) that
> for many applications there will be little performance
> difference. I say
> this because I'm expecting in many (most?) cases the actual
> integral values
> will be known to the compiler.
> Has any thought been given to adding this? Or, perhaps even
> making this the
> default bounded_int, (wrapping_int, etc.) type?
Yes, I'm still thinking about this. The difference between static and
run-time bounds is that in the latter case a bounded object needs to store
the bounds which makes its size at least 3 times bigger. Another one is that
with static bounds many checking operations may be optimised-away or at
least inlined. Therefore I'd rather not make run-time bounds the default.
I'm working on this as an optional feature, but this is a little bit harder
than it seems to unite the two concepts.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk