|
Boost : |
Subject: Re: [boost] [ptr_container] ptr_vector across DLL boundaries
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-06-26 19:48:28
Christian Schladetsch skrev:
>> PS. Perhaps just porting ptr_container to use boost::container rather than
>>> std::container would solve Roberts problem?
>>>
>> No. He needs to "install" his own new/delete with the container.
>
>
> Isn't this called a stateful allocator? Which boost::container supports?
Hm. Is it? So construct() and destroy() would act as custom
allocator/deleter?
Anyway, let's say that all allocation is done with the supplied
allocator via rebind<>. This is what you require to use ptr_container
with monotonic allocators, right?
But how do you get objects into the ptr_container in the first place?
Do you intend users to write
container c;
c.push_back( c.get_allocator().construct(
c.get_allocator().allocate(sizeof(T)) );
?
And how do you pass constructor arguments to construct?
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk