I have custom class Person which contains only data about person ( name, last name, height …). I have couple lists of pointers to Person like
list<Person*> list1;
list<Person*> list3;
list<Person*> list2;
and I concatenate
using std::copy() and std::back_insert_iterator<std::list<Person*> >
How to remove duplicates from list (only pointers which point to same junk of memory, not to delete that memory, only remove pointers from list) ?
If you don’t mind reordering the list: