Give each of the relevant functional operators a __result_type instead, so that we can keep using those typedefs in <valarray> even when the public binder typedefs are removed in C++20.
This is a bit of a hacky lazy way to eliminate valarray's dependency on {unary,binary}_function, but it kinda seems like all of valarray is a hack and so maybe this fits right in? ;)
I would be willing to spend some time trying to recast all this metaprogramming in terms of decltype, but the first thing I tried didn't immediately work, so I went with the safe route.
The main point of this patch is to clear the way for _LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS (and incidentally _LIBCPP_ABI_NO_BINDER_BASES), which I have already got in a local patch on top of this one.
Btw, we could eliminate 9 lines of custom __bit_not<T> code from <valarray> if we made std::bit_not<T> here available in C++03 mode as an extension. Thoughts?