Boost logo

Boost :

Subject: Re: [boost] Proposal: Monotonic Containers
From: Christian Schladetsch (christian.schladetsch_at_[hidden])
Date: 2009-06-16 00:29:55


>
> 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
    }


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk