I believe this is a complete implementation of P1065R2 "Constexpr INVOKE" (Tomasz Kamiński, Barry Revzin), which was adopted for C++20.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1065r2.html
This could use more constexpr tests for std::reference_wrapper<T>, but the existing tests are extremely constexpr-unfriendly and so I don't want to get into that rabbit-hole today.
I plan to push the refactoring of ForwardingCallObject as a separate preliminary commit:
[libc++] Constexpr-proof some machinery in not_fn.pass.cpp. NFCI.
I assume it didn't make sense to merge these with the existing tests because of functions like foo which would only work in one mode or the other?
Is there any test coverage here that isn't in the non-constexpr version? If so, would it make sense to run these tests outside of a constexpr context as well (it very well might not)?