1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#pragma once
namespace storm {
/**
* To minimize the work required for implementing operators, this header implements some
* convenience overloads. In the end, only either == and < is needed.
*
* This convention is followed by Storm as well. Storm also generates == if only < is provided.
*/
template <class T>
inline bool operator >(const T &a, const T &b) {
return b < a;
}
template <class T>
inline bool operator <=(const T &a, const T &b) {
return !(a > b);
}
template <class T>
inline bool operator >=(const T &a, const T &b) {
return !(a < b);
}
template <class T>
inline bool operator !=(const T &a, const T &b) {
return !(a == b);
}
}
|