void f(int){} typedef void (*f_ptr)(int); struct Functor{ void operator()(int){} }; struct X{ operator f_ptr(){ return f; } }; struct Y{ operator Functor(){ return Functor(); } }; int main(){ X x; Y y; x(5); // works ?! y(5); // doesn't ?! }

Live example on Ideone. Output:

error: no match for call to '(Y) (int)'

Q1: Why is the call to x(5) allowed, even though X only defines a conversion to function pointer, and not operator() ?

Q2: Conversely, why is the same thing not allowed, if we define a conversion to another functor?