Boost logo

Boost :

From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2008-08-15 03:10:54

Daryle Walker wrote:


> [1] 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.

Best Regards,


Boost list run by bdawes at, gregod at, cpdaniel at, john at