Skip to content
Snippets Groups Projects
Commit 93cf3128 authored by laurence's avatar laurence
Browse files

ENH: Pair: Add operator<()

parent 26a9fbb6
Branches
Tags
No related merge requests found
......@@ -167,6 +167,19 @@ public:
{
return !(a == b);
}
friend bool operator<(const Pair<Type>& a, const Pair<Type>& b)
{
return
(
a.first() < b.first()
||
(
!(b.first() < a.first())
&& a.second() < b.second()
)
);
}
};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment