Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-01-31 11:07:02


From: "Hubert Holin" <Hubert.Holin_at_[hidden]>
> Somewhere in the E.U., le 31/01/2003
>
> In article <00d801c2c927$8d06dd20$1d00a8c0_at_pdimov2>,
> "Peter Dimov" <pdimov_at_[hidden]> wrote:
>
> > From: "Hubert Holin" <Hubert.Holin_at_[hidden]>
> >
> > > eater(::boost::bind(std::mem_fun_ref(&(A::operator ())), a));
> >
> > eater(a) is much simpler, I think.
>
> Indeed!
>
> >
> > > eater(::boost::bind(std::mem_fun_ref(&(AN::operator ())), an, 1));
> >
> > eater(bind(an, 1));
>
> Doesn't work (with MWCWPro 8.3, at least), giving me the error:
>
> Error : 'result_type' is not a member of class 'AN'

My mistake. bind needs a result_type typedef in AN to determine the return
type of its operator(). The alternative is to supply it explicitly:
bind<void>(an, 1)).


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk