Containers I'd like to see in std.containers
    Marianne Gagnon 
    auria.mg at gmail.com
       
    Sun May 30 15:29:23 PDT 2010
    
    
  
Rainer Deyke Wrote:
> On 5/30/2010 15:53, Philippe Sigaud wrote:
> > There are some simple containers I'd like to see in std.containers:
> > 
> > - a priority queue
> > - a heap
> > - a stack, a queue
> > - a set
> 
> Any container that supports pushing and popping on one end can be used
> as a stack.  Any container that supports pushing on one end and popping
> on the other can be used as a queue.  I don't think either of these need
> their own container type.
> 
in the C++ STL, queues and stacks are only adapters to another container I believe; but I still think it's useful to have them.
Stack!int m_ints;
seems clearer to me than :
/** this is a stack */
Vector!int m_ints;
    
    
More information about the Digitalmars-d
mailing list