I want to cast a template function's address to void*
:
template<typename T>
int prt(T a)
{
return ++a;
}
void* ptr = static_cast<void*>(&prt<int>);
In MSVC compiler, it works, but in clang it causes a compilation error:
address of overloaded function 'prt' cannot be static_cast to type 'PVOID' (aka 'void *')
Why doesn't clang allow this?