11 Jun
2010
11 Jun
'10
1:38 p.m.
AMDG Mikhail Tatarnikov wrote:
Is there a way to make boost::function to be passed to a function required a pointer to a member function as parameter:
struct CFoo { int foo1(int){} int foo2(int, double){} };
int g(int (CFoo::*)(int));
<snip>
but is it possible to solve the problem is g() can't be changed?
No. Sorry. The only way to solve this without changing g is to add another member function to CFoo which forwards to a global boost::function. (Ugh.) In Christ, Steven Watanabe