I just wonder if there is any sexy way in C++ (using standard library functions) to do something like that:
I've got two maps (std::map), both same type. I'd like to add both maps together, but also decide which elements add and which not with some lambda predicate.
Any solution? Thanks.
std::merge,std::set_union,std::multimap, and also consider whethera.key_comp() == b.key_comp()(comparators may be stateful!).