
From: "michael toksvig" <michaeltoksvig@yahoo.com>
a counter-question, rob: how would you handle the addition of 2 numbers between 90 and 100, in your model?
there are no possible outputs (180-200) within the input range (90-100). if, as i believe you suggest, the output range must match the input range, you would have to cast the inputs to match the output range. but the input and output ranges are disjunct
I concede. That case is compelling. If the library user tries to put the result in a 90-100 range object, it will fail to compile because there's no way for that to work. Note that if the destination type can possibly hold the result, then the check has to wait for run time. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;