
1 Sep
2011
1 Sep
'11
6:42 a.m.
On 01/09/2011 3:13, Jeffrey Lee Hellrung, Jr. wrote:
The following does not compile for me if I remove the comment from "//x(0);" (MSVC9):
struct X { struct Y { void operator()(int) const { } }; operator Y() const { return Y(); } };
int main(int argc, const char* argv[]) { X x; //x(0); static_cast< X::Y>(x)(0); return 0; }
Is this what you had in mind, or something else?
Indeed, it seems I have been confused. Probably by the fact that it works for function pointers. I will take another look at the whole overloaded function object in the morning. Agustín K-ballo Bergé.- http://talesofcpp.blogspot.com