Boost logo

Boost Users :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-05-26 05:03:09


Felipe Magno de Almeida skrev:
> On 5/25/07, Seweryn Habdank-Wojewódzki <shw_at_[hidden]> wrote:
>> # sobota 26 maja 2007 02:14, @ Felipe Magno de Almeida:
>>> Use ptr_vector<ptr_vector<T> >
>> Thanks
>>
>> Btw why there is no way to work with it like that:
>>
>> ptr_vector<Foo> g;
>> g.push_back ( new Foo(1,k) );
>>
>> ptr_vector<ptr_vector<Foo> > d;
>> d.push_back ( new ptr_vector<Foo> ( g ) );

d.push_back( g.clone() );

> Because ptr_vector is not copy-constructable. That is the same reason
> why you can't use it inside a STL container.

In 1.35 I plan to change this so all ptr containers can be copied. I
still don't recommend vector< ptr_vector<T> >, but I'll let the user
decide when he wants to copy.

-Thorsten


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net