
----- Original Message ----- From: "Bohdan" <yg-boost-users@m.gmane.org> Newsgroups: gmane.comp.lib.boost.user Sent: Thursday, August 01, 2002 11:12 AM Subject: Re: collection container
"Matthias Kronenberger" <mkronen@rhrk.uni-kl.de> wrote in message news:000501c238ec$cdd152c0$5ab2f683@koe5isewcagsnh...
Hm, what's the point in having such collections? The pointers in a container would refer to data that is stored
somewhere.
ok. What if your class hasn't copy constructor or you don't want to copy your object ... have you other choice ?
Well, the objects need to be stored somewhere. If we don't want to deal with reallocation, we need a container whose iterators are stable under insert, for example a list or a set. You are now able to use the iterator to that container to access the objects. std::vector <someIterator> v; v[123]->functionCall(); or v.front()-> dataMember; or (*v.begin())-> dataMember; Would that help?