summaryrefslogtreecommitdiff
path: root/src/util/rational_cln_imp.h
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2018-01-07 16:46:16 -0800
committerGitHub <noreply@github.com>2018-01-07 16:46:16 -0800
commit20957db27201d594a83e0e5abe77875ed4932faf (patch)
tree47c665493a2a26d9ad50d2f53de310a7ce8193e0 /src/util/rational_cln_imp.h
parent8497910df4d1c254b26f09c3dc5ee6191c970b12 (diff)
Removes RationalFromDoubleException. Replaces this with an explicit M… (#1476)
* Removes RationalFromDoubleException. Replaces this with an explicit Maybe<Rational> datatype. Makes Maybe<T> CVC4_PUBLIC. Updates the users of Rational::fromDouble(). Miscellaneous cleanup of ApproxSimplex.
Diffstat (limited to 'src/util/rational_cln_imp.h')
-rw-r--r--src/util/rational_cln_imp.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/util/rational_cln_imp.h b/src/util/rational_cln_imp.h
index bdfff9875..0b09bf1fd 100644
--- a/src/util/rational_cln_imp.h
+++ b/src/util/rational_cln_imp.h
@@ -35,14 +35,10 @@
#include "base/exception.h"
#include "util/integer.h"
+#include "util/maybe.h"
namespace CVC4 {
-class CVC4_PUBLIC RationalFromDoubleException : public Exception {
-public:
- RationalFromDoubleException(double d) throw();
-};
-
/**
** A multi-precision rational constant.
** This stores the rational as a pair of multi-precision integers,
@@ -201,7 +197,7 @@ public:
}
/** Return an exact rational for a double d. */
- static Rational fromDouble(double d) throw(RationalFromDoubleException);
+ static Maybe<Rational> fromDouble(double d);
/**
* Get a double representation of this Rational, which is
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback