Hi,
today i had to switch from ptr_vector<MyType> to
vector (needed weak_ptr's to these elements
somewhere else).
Unfortunately the interfaces of these two containers are quite different
when it comes to element access, e.g., ptr_vector<MyType> returns a
reference to MyType vs. vectoroperator[] returns a
reference to a shared_ptr<MyType>.
In my case i had a hard time replacing countless occurrences of
"BOOST_FOREACH(MyType& e, getMyTypeContainerFromSomewhere())".
I'am wondering whats your opinion about a shared_ptr_vector<> that will
comply to a ptr_sequence_adapter, using shared_ptr<> to store the
elements, and including the possibility to get access to the shared_ptr<> ?
Is there any reason why such a container is a bad idea (and thus not
already part of the library)?
greetings
Jan