regarding std::mem_fun vs lambdas and which is more efficient, I found this link helpful for me; https://tech.jocodoma.com/2019/02/25/Lambdas-as-First-Class-Citizens-in-CPP/ basically they claim lambdas, as of C++11 / C++17, seem to be the better solution