fix(util/rb_multi_map): no duplicate values

This commit is contained in:
Daniel Selsam 2015-11-24 20:17:15 -08:00
parent c923120db5
commit 8f4bc7e0ba

View file

@ -33,7 +33,7 @@ public:
}
void insert(T const & t, V const & v) {
if (auto it = m_map.find(t))
m_map.insert(t, cons(v, *it));
m_map.insert(t, cons(v, ::lean::filter(*it, [&](V const & v2) { return v != v2; })));
else
m_map.insert(t, to_list(v));
}