Fixes Issue #25

This commit is contained in:
Ion Gaztañaga committed 2019-04-08 00:32:28 +02:00
1 parent 2d00bc5d74
commit bfdfca0b88
9 files changed
+267 -130

No files matched your search

+11
View File
@@ -36,11 +36,22 @@ struct antistable
bool operator()(const U &u, const V & v)
{ return !m_comp(v, u); }
const Comp &get() const
{ return m_comp; }
private:
antistable & operator=(const antistable &);
Comp &m_comp;
};
template<class Comp>
Comp unantistable(Comp comp)
{ return comp; }
template<class Comp>
Comp unantistable(antistable<Comp> comp)
{ return comp.get(); }
template <class Comp>
class negate
{