Unary_function is deprecated since c++11 and is being removed from current compilers e.g. clang17, so that compilation falls.