summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2012-11-15 02:15:22 +0000
committerTim King <taking@cs.nyu.edu>2012-11-15 02:15:22 +0000
commit936bf9eb1881b1fb5e80fd75eb7f81c512712b83 (patch)
tree7d3a8f0b6fd31b6b107c7b838c8402892d12b570 /src/util
parentdc0372a91ae46e6fc5ead1f51a1fe033cfd19944 (diff)
Fix for bug 447.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/result.cpp14
-rw-r--r--src/util/result.h6
2 files changed, 20 insertions, 0 deletions
diff --git a/src/util/result.cpp b/src/util/result.cpp
index f51bacee7..6a32747cb 100644
--- a/src/util/result.cpp
+++ b/src/util/result.cpp
@@ -92,6 +92,20 @@ bool Result::operator==(const Result& r) const throw() {
return false;
}
+bool operator==(enum Result::Sat sr, const Result& r) throw() {
+ return r == sr;
+}
+
+bool operator==(enum Result::Validity vr, const Result& r) throw() {
+ return r == vr;
+}
+bool operator!=(enum Result::Sat s, const Result& r) throw(){
+ return !(s == r);
+}
+bool operator!=(enum Result::Validity v, const Result& r) throw(){
+ return !(v == r);
+}
+
Result Result::asSatisfiabilityResult() const throw() {
if(d_which == TYPE_SAT) {
return *this;
diff --git a/src/util/result.h b/src/util/result.h
index 7d53f8add..fd1d82d9b 100644
--- a/src/util/result.h
+++ b/src/util/result.h
@@ -155,6 +155,12 @@ std::ostream& operator<<(std::ostream& out,
std::ostream& operator<<(std::ostream& out,
enum Result::UnknownExplanation e) CVC4_PUBLIC;
+bool operator==(enum Result::Sat s, const Result& r) throw() CVC4_PUBLIC;
+bool operator==(enum Result::Validity v, const Result& r) throw() CVC4_PUBLIC;
+
+bool operator!=(enum Result::Sat s, const Result& r) throw() CVC4_PUBLIC;
+bool operator!=(enum Result::Validity v, const Result& r) throw() CVC4_PUBLIC;
+
}/* CVC4 namespace */
#endif /* __CVC4__RESULT_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback