Standard containers by default place their contents on the free store. You can give them an allocator that allocates from some other place.
Standard containers by default place their contents on the free store. You can give them an allocator that allocates from some other place.
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
lol I wished I'd phrased my question that way first! That's all I needed to know really.... thanks very much!
On a side note, it's not possible to write a standard-compliant allocator that allocates from the stack for a standard-compliant container. Not unless you basically take a huge block of stack and then do your own memory management within it.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law