I may help, but why not describing the problem in the thread, so anyone can participate and the solution may help others, too?
If that is not possible due to legal reason (your project is top secret), try breaking the error down to a simple case which has nothing to do with your project anymore.
With best regards
Jeoni
The lambda (and therefor the check) is called for each object in estateList. The town-member is just made up, but I guess the class includes something like this. And town (not the member) is the argument passed to the listByTown function as already done in your example.
With best regards
Jeoni
Is your result list (listByTown) big enough to hold the objects? Since copy_if do not change the size of the result list, it has to be allocated before.
With best regards
Jeoni
Is there any way to reserve memory for X elements? Like the reserve method for vectors?
And yes, the list should have push_back method, since it's already defined. Still it doesnt work if my list size is less or more than the actual number of objects from the desired town.