There is such code:
#include <iostream> using namespace std; int func() { cout << "func" << endl; return 0; } int main() { void * p; p = func; cout << p << endl; cout << func << endl; return 0; } In Visual Studio 2010, this code compiles beautifully and in both cases prints some address.
Question 1. Is there an implicit conversion that allows you to convert a function (a pointer to a function?) void * type?
Question 2. Why, when passing a function as an argument to an overloaded operator, did the compiler convert the function (pointer to function?) To void * type again, and not, say, to bool ? After all, there is an implicit conversion that allows you to convert a pointer to the bool type.
/Zakey is still compiling. Backward compatibility and all that. - VladD