
From: Bronek Kozicki <brok@rubikon.pl>
Rob Stewart wrote:
static void exec(void * p) ^^^^^^ Unfortunately, the type of exec is void (_lever_t<Function *>::*)(void *) not void (*)(void *) as you've declared _pf_t. Thus, on any compiler that uses a different function pointer type for pointers to member functions and regular function pointers, will fail to compile this code.
No. exec is static member function. I'm pretty sure that its address can be used to initialize regular function pointer, and that it's portable and guaranteed by C++ standard. Futhermore, I'm quite sure that type you mention is not applicable to static members of class.
You're entirely correct. I glossed right over "static." -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;