summaryrefslogtreecommitdiff
path: root/src/util/integer_cln_imp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/integer_cln_imp.h')
-rw-r--r--src/util/integer_cln_imp.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/util/integer_cln_imp.h b/src/util/integer_cln_imp.h
index 177fc02cf..6bfebbaf1 100644
--- a/src/util/integer_cln_imp.h
+++ b/src/util/integer_cln_imp.h
@@ -66,7 +66,9 @@ private:
static signed long s_slowSignedIntMax; /* std::numeric_limits<signed int>::max() */
static signed long s_slowSignedIntMin; /* std::numeric_limits<signed int>::min() */
static unsigned long s_slowUnsignedIntMax; /* std::numeric_limits<unsigned int>::max() */
-
+ static unsigned long s_signedLongMin;
+ static unsigned long s_signedLongMax;
+ static unsigned long s_unsignedLongMax;
public:
/** Constructs a rational with the value 0. */
@@ -425,6 +427,10 @@ public:
unsigned int getUnsignedInt() const;
+ bool fitsSignedLong() const;
+
+ bool fitsUnsignedLong() const;
+
long getLong() const {
// ensure there isn't overflow
CheckArgument(d_value <= std::numeric_limits<long>::max(), this,
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback