Skip to the content.

:warning: library/superstd/Map.hpp

Depends on

Code

template <typename Key, typename Val> struct Map : std::map<Key, Val> {
    using std::map<Key, Val>::erase;

    void operator()(Key key, Val val) {
        if (!((*this)[key] += val))
            erase(key);
    }
};
#line 1 "library/superstd/Map.hpp"
template <typename Key, typename Val> struct Map : std::map<Key, Val> {
    using std::map<Key, Val>::erase;

    void operator()(Key key, Val val) {
        if (!((*this)[key] += val))
            erase(key);
    }
};
Back to top page