如何从函数指针类型获取签名类型?

asm*_*aty 0 c++ c++17

假设我有以下函数指针 typedef:

    using FType = int(*)(int,int);
Run Code Online (Sandbox Code Playgroud)

如何std::function使用 的签名构造对象FType

例如,如果使用 FType 定义using FType = int(int,int),则可以通过以下方式完成std::funtion<FType> func = ...

Hol*_*Cat 5

using FType = int(*)(int,int);
std::function<std::remove_pointer_t<FType>> func;
Run Code Online (Sandbox Code Playgroud)