
16 Jun
2009
16 Jun
'09
4:29 a.m.
What I see instead is that containers like chain<> can use monotonic::storage where some of the earlier links are on the stack, and when that is exhausted, the remaining links go on the heap. This is transparent to the chain. Similiarly for other node-based containers, but this cannot work for obvious reasons for vector.
Wrong again. The `new` storage<> can and does indeed support a vector 'migrating' correctly from the stack to the heap: monotonic::storage<100> store; { typedef std::vector<char, monotonic::allocator<char> > Vector; Vector vec(store); vec.resize(10); // on the stack vec.resize(1000); // now on the heap }