From 12628f36893d67ee5b22fa64d4a16c1b3aba9e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Tomic=CC=8Cevic=CC=81?= Date: Sat, 21 Nov 2015 13:57:15 +0100 Subject: [PATCH] skeleton for total ordering --- utils/total_ordering.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 utils/total_ordering.hpp diff --git a/utils/total_ordering.hpp b/utils/total_ordering.hpp new file mode 100644 index 000000000..6272c56a9 --- /dev/null +++ b/utils/total_ordering.hpp @@ -0,0 +1,16 @@ +#pragma once + +template +struct TotalOrdering +{ + friend bool operator!=(const Derived& a, const Derived& b) + { + return !(a == b); + } + + friend bool operator>(const Derived& a, const Derived& b) + { + return !(a == b); + } + +};