How make the following compile correctly with C++20, a.k.a calculate extract<mem_fun>::type? Is it possible?
Error-scenarios like passing non-member function or private function extract<> are not so important for me.
#include <concepts>
struct x
{
void f()
{
}
};
template<auto mem_fun>
struct extract
{
// using type= ???
};
int main()
{
using namespace std;
static_assert(same_as<typename extract<&x::f>::type, x>);
return 0;
}