Closed sylveon closed 4 years ago
Not possible
Goes in the lines of
template<typename T, typename U>
class sentinel
{
T *pthis;
U pfunc;
public:
template<typename V>
requires is_compatible_function_types_v<V, T, U>
operator unique_ptr<thunk<V>>()
{
return make<V>(pthis, pfunc);
}
};
template<typename T, typename U>
sentinel<T, U> make(T *pthis, U pfunc)
{
return { pthis, pfunc };
}
Can we make
member_thunk::make(this, &Foo::bar)
valid and deduce the return type?