Replace std::binary_function usage with a lambda

std::binary_function is removed in C++17, and the lambda is perfectly
fine here.
2 jobs for master in 10 minutes and 31 seconds (queued for 2 seconds)
Status Name Job ID Coverage
  Build
passed build_clazy_clang_tidy #101706

00:07:07

passed linux kf5-qt5 qt5.15 #101705

00:03:23

12.0%