From 8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 9 Apr 2013 17:59:01 -0700 Subject: Also implement x32 support --- src/common/operators.hpp | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/common/operators.hpp (limited to 'src/common/operators.hpp') diff --git a/src/common/operators.hpp b/src/common/operators.hpp new file mode 100644 index 0000000..3d44b81 --- /dev/null +++ b/src/common/operators.hpp @@ -0,0 +1,47 @@ +#ifndef OPERATORS_HPP +#define OPERATORS_HPP + +namespace _operators +{ + class Comparable {}; + + template + bool operator == (T l, T r) + { + return l.value == r.value; + } + + template + bool operator != (T l, T r) + { + return l.value != r.value; + } + + template + bool operator < (T l, T r) + { + return l.value < r.value; + } + + template + bool operator <= (T l, T r) + { + return l.value <= r.value; + } + + template + bool operator > (T l, T r) + { + return l.value > r.value; + } + + template + bool operator >= (T l, T r) + { + return l.value >= r.value; + } +} + +using _operators::Comparable; + +#endif // OPERATORS_HPP -- cgit v1.2.3-70-g09d2