Boost logo

Boost :

Subject: [boost] [rational] Over/underflow checked update ready for comments
From: Dan Searles (dansearles_at_[hidden])
Date: 2012-08-26 18:08:19

>> Quick overview of the update: the original usage and >> code of the template class remains mostly as before, ie >> boost::rational<int> RationalVar; should work as >> in the original version. Adding 'true' as a second >> template parameter, however, allows an exception to >> be raised if an operation with a class variable results >> in a value that can't accurately be represented >I haven't looked at anything else, but I dislike using true/false as the template argument.  I'd prefer meaningful names. _____ >Rob Stewart                          robert.stewart_at_[hidden] >Software Engineer                    using std::disclaimer; >Dev Tools & Components >Susquehanna International Group, LLP Replaced the bool template parameter with an enum: enum RationalChecktype {RationalNoChecking, RationalCheckforOverflow};

Boost list run by bdawes at, gregod at, cpdaniel at, john at