Standard C++ Library Class Reference
first_map.end());
But not this way:
map<long, long, less<long> > long_map(first_map.begin(),
first_map.end());
Since the long_map and first_map are not the same type.
Also, many compilers do not support default template arguments. If your compiler is one of
these, you need to always supply the Compare template argument and the Allocator template
argument. For instance, you'll have to write:
map<int, int, less<int>, allocator>
instead of:
map<int, int>
See Also
allocator, Containers, Iterators, multimap