As a consequence of this answer, the template you are looking for is simple:
using function_type = decltype(std::declval<function_type_declaration>());
Those.
#include <utility> //... using function_type = decltype(std::declval<void (*)(void*)noexcept>());
This does not work with extern communication, including extern "C" , that is:
// INVALID using function_type = decltype(std::declval<extern "C" void(*)(void)>()); // WORKAROUND extern "C" void function_type_dummy(void); using function_type = decltype(&function_type_dummy);
Kuba ober
source share