How to write generic operations on C++ STL containers? For example, Java has Collection interface, which every Java containers (except for maps) implements. I can do operations
C++ has std::inserter and friends to add elements to a container in a generic way. They are in the header file iterator.
iterator