implementation of queue in c++

R

Rapscallion

Kai-Uwe Bux said:
Why would you want to: what about using std::queue?

Because std::queue is value-based (like any Standard container), not
pointer-based?
 
K

Kai-Uwe Bux

Rapscallion said:
Because std::queue is value-based (like any Standard container), not
pointer-based?

I am confused, very likely, I do not understand what "pointer-based queue"
means: what about std::queue< T* > or some std::queue< SmartPtr< T > > ?


Best

Kai-Uwe Bux
 
P

Peter Julian

Rapscallion said:
Because std::queue is value-based (like any Standard container), not
pointer-based?

A standard container can both provide the allocation mechanism or let the
user manage it. What makes you believe that a valid derefenced pointer is
not a value?
 
I

Ioannis Vranos

Rapscallion said:
Because std::queue is value-based (like any Standard container), not
pointer-based?


I am not sure what you mean. It is implemented by using pointers and can store variables,
pointers or any other objects.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top