Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2004-01-06 11:17:59


I was just thinking, it might be useful to have a way of specifying
range limits to quantities. For instance, degrees Celsius don't make
much sense below -273. Degrees Kelvin are never negative. Speed can't go
beyond C (unless we're programming a StarTrek game, but then we could
have a Warp unit). Tensile strength is never negative, and so on.

Just the ability to set limits would be good to have, though; NOT the
limits themselves.

And they would only be checked by default when initializing from
constants. Run-time verifications should be explicit only, as the values
can go beyond limits when computing temporaries in long expressions.

Cheers!


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk