Removed C++11 `std::unary_function` and `std::binary_function` break clang compilation on macOS
Bug Description
Removed C++17 std::unary_functionand
std::binary_function` break compilation with clang on macOS (below error is in ast module):
src/cpp/types/sparse.cpp:2690:44: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
template<typename S> struct GetReal : std::unary_function<typename S::InnerIterator, double>
std::unary_function
is deprecated since C++11 and but some C++17 compilers still implement it: gcc, vsc++, clang 14 (x86_64 build), and some don't, for example here arm64 build of clang 14.
Features are claimed to be now useless in C++17 (https://stackoverflow.com/questions/63577103/what-is-an-equivalent-replacement-for-stdunary-function-in-c17) and base class std::unary_function
and std::binary_function
declarations can be safely removed.
Edited by Stéphane MOTTELET