|
Boost Users : |
Subject: Re: [Boost-users] boost::function, pointer to a member function.
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-06-11 09:38:14
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net