summaryrefslogtreecommitdiff
path: root/impl/Complete.hpp
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-06-15 11:26:32 +1000
committerCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-06-15 11:26:32 +1000
commit5f3cb0bf02ed32976370cf6c7f656d000b4d7694 (patch)
tree2100c31e7b57d895592904b683954cc3e74838db /impl/Complete.hpp
parentf09ce60d45d5524e36d07e76814b6e0cbc554288 (diff)
Re-write heaps of code to work better.
Diffstat (limited to 'impl/Complete.hpp')
-rw-r--r--impl/Complete.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/impl/Complete.hpp b/impl/Complete.hpp
index 1cf40af..22e060a 100644
--- a/impl/Complete.hpp
+++ b/impl/Complete.hpp
@@ -5,9 +5,14 @@
#include <istream>
template<typename T>
+T infinity() { }
+
+template<typename T>
struct Complete {
Complete()
: _value(0), _infinity(false) { }
+ Complete(const T& value)
+ : _value(value), _infinity(false) { }
Complete(const T& value, const bool& infinity)
: _value(value), _infinity(infinity) {
if (value == 0 && infinity == true) {
@@ -69,7 +74,7 @@ struct Complete {
}
}
bool operator>(const Complete& other) const {
- return !(*this < other || *this == other);
+ return other < *this;
}
bool operator==(const Complete& other) const {
if (_infinity) {