Lecture Notes for CS 509, Advanced Programming II

2 March 2004 - STL Maps


There is no true equivalent of push_front(X) for maps (or any of the other sorted-associative containers) because X may end up at someplace other than the beginning of the map depending in its relation to the other elements in the map.

If X is the smallest element among the elements in the map m, then m.insert(m.begin(), X) is equivalent to m.push_front(X).


This page last modified on 12 March 2004.