From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2008-08-15 03:10:54
Daryle Walker wrote:
>  Why isn't adaptor pushing done with "c.insert(c.end(), t)"
> instead of "c.push_back(t)"? The "insert" method will work with
> associative containers too.
I guess because pop() can't be implemented reasonably with associative containers anyway.
E.g. for stack pop() must know where the last pushed element got inserted up.
That is straightforward with sequences but impossible (without some sort of extra bookkeeping) with associative containers.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk