Sync with 5.2.0
[deliverable/titan.core.git] / compiler2 / subtypestuff.hh
index 86970b385dd6ea914b62f3bed753b95f4572d6dd..473213e7b23bdf12db3c614a450eb9248053ddef 100644 (file)
@@ -260,6 +260,9 @@ public:
   LIMITTYPE get_minimal() const;
   LIMITTYPE get_maximal() const;
 
+  bool is_upper_limit_infinity() const;
+  bool is_lower_limit_infinity() const;
+
   string to_string(bool add_brackets=true) const;
 
   /** conversion from integer range to size range,
@@ -538,6 +541,20 @@ LIMITTYPE RangeListConstraint<LIMITTYPE>::get_maximal() const
   return values[values.size()-1];
 }
 
+template <typename LIMITTYPE>
+bool RangeListConstraint<LIMITTYPE>::is_upper_limit_infinity () const
+{
+  if (0 == values.size()) return false;
+  return LIMITTYPE::maximum == values[values.size()-1];
+}
+
+template <typename LIMITTYPE>
+bool RangeListConstraint<LIMITTYPE>::is_lower_limit_infinity () const
+{
+  if (0 == values.size()) return false;
+  return LIMITTYPE::minimum == values[0];
+}
+
 template <typename LIMITTYPE>
 string RangeListConstraint<LIMITTYPE>::to_string(bool add_brackets) const
 {
@@ -597,6 +614,8 @@ public:
   real_limit_t get_maximal() const { return rlc.get_maximal(); }
 
   string to_string() const;
+  bool is_upper_limit_infinity() const;
+  bool is_lower_limit_infinity() const;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
This page took 0.0328270000000001 seconds and 5 git commands to generate.