I always forget how much I struggle with C++'s patterns for using their data containers. This is how much code you have to write to find the intersection between two sets:
auto intersec = set<int>(); std::set_intersection(lhs.begin(), lhs.end(), rhs.begin(), rhs.end(), std::inserter(intersec, intersec.begin()));
The worst for me is the fact that it would be fairly easy to implement a template that could be called like this:
set<int> intersect = set_intersection(lhs, rhs);
I can go do it myself, but there are a too many of these inconvenient hoop-jumping interfaces to bother writing convenience functions for everything. And it is such a hassle to add external dependencies to a project, that it’s not worth the effort to add some third party convenience functions.
Some of C++'s hoop-jumpings are so familiar that the community even started naming them (like the remove/erase idiom), yet they don’t just implement a convenient function for it in the standard library: