skeleton for total ordering
This commit is contained in:
parent
655b4c04dd
commit
12628f3689
16
utils/total_ordering.hpp
Normal file
16
utils/total_ordering.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
template <class Derived>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user