$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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