|
Boost : |
Subject: [boost] [rational] with optional over/underflow checking
From: Dan Searles (dansearles_at_[hidden])
Date: 2012-07-30 10:53:40
Hello,
Would there be any interest in a modified "rational" class template/header
that optionally allows for an exception be generated if there is under/overflow
during any of the operations? I have been developing such a template, where
the new defaulted bool template parameter would generate the class exactly
as before to preserve the original stable implementation, and to support
unlimited-precision
integer where over/underflow would not be possible.
Setting the new template parameter to true, however would generate code
that adds the over/underflow checking.
I have also generated new test driver code (BTW test code referenced by the
documentation does not appear to exist, or at least the link is broken).
rational.hpp has been around and stable for quite some time, so there may
be a desire to keep it unchanged, but its original function (and indeed its
original source code) can be maintained through the template system.
If such a class were to be included in boost, what would be the best
submission method?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk