26 May
2007
26 May
'07
9:03 a.m.
Felipe Magno de Almeida skrev:
On 5/25/07, Seweryn Habdank-Wojewódzki
wrote: # sobota 26 maja 2007 02:14, @ Felipe Magno de Almeida:
Use ptr_vector
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
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