On Sun, Jan 17, 2010 at 02:11:35AM +0100, Vincent van Ravesteijn wrote: >> for_each(pit, plist.end(), >> bind(&ParagraphList::push_back, ref(pl), _1)); > > don't bother. > > This is just like: > > for (pit = plist.begin(); pit != plist.end(); ++pit) > pl.push_back((*pit)) > > just copying all paragraphs from plist into pl. > >> makes me headache since I'm only a hobby programmer and not a >> professional one. > > Don't ask me then, I'm nothing like a professional programmer.
I think in case like for_each(pit, plist.end(), bind(&ParagraphList::push_back, ref(pl), _1)); vs for (pit = plist.begin(); pit != plist.end(); ++pit) pl.push_back(*pit); we should always use the plain loop excatly for the reason that it is easier to understand as it requires less concepts to be familar with. Andre'