[Qt-interest] Problems with template and function pointer

mario dodiesis at gmail.com
Thu Nov 4 15:16:01 CET 2010


2010/11/4 Sean Harmer <sean.harmer at maps-technology.com>:
> ( *this.*m_function )();
I tried...

( *this->*p )();
//error: no match for ‘operator->*’ in ‘*(Module<ModuleTest>*)this ->* p’

(this->*p)();
//error: pointer to member type ‘void (ModuleTest::)()’ incompatible
with object type ‘Module<ModuleTest>’

Module<T>* inst = this;
(*inst->*p)();
//error: no match for ‘operator->*’ in ‘* inst ->* p’


I think the problem is that I'm using a template.

Tnx for your time, guys!

Regards,
Mario

-- 
Mario Signorino | www.sgrunt.net




More information about the Qt-interest-old mailing list