[Correction (deleting the word "without"):]

On 8 Dec 2005, at 08:58, Joel E. Denny wrote:

Under C++, one would be able to choose stack, with at least two standard
choices: std::vector, and std::deque.

I see.  I need to study this thing some day.

When std::deque runs out of allocation, it allocates a new memory chunk for extension, keeping the old one intact, thus avoiding invoking copy constructors, using C++ class interface capability to paste the chunks together transparently. The class std::vector is just a traditional array, which copies the old data over to a larger chunk. Thus, it works like the current C stacks that Bison uses.

  Hans Aberg






Reply via email to