|
Boost Users : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-08-24 16:15:12
"Thomas Matelich" <matelich_at_[hidden]> wrote in message
news:3944d45805082413376846589a_at_mail.gmail.com...
> > you prefer the containers to copy-constructible?
>
> Well, I blew my 1 day exploration into replacing with ptr_vector
> without learning much except that we copy these SmartVector's around a
> lot, including returning them from functions.
copying a ptr_vector can be very expensive...that is why
you can release it
auto_ptr< ptr_vector<T> > foo()
{
ptr_vector<T> vec;
...
return vec.release();
}
> Unfortunately, we don't
> do it very often in the unittests I was trying to do my timing with.
> Anyway, my explorations did tell me that I think replacing our
> vector<shared_ptr> would probably work better as a shared_ptr<vector>.
> I'll look into it next time I have a day to blow.
>
> Thanks anyway for a cool library.
you're welcome.
br
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