Boost logo

Boost :

From: Hubert Holin (Hubert.Holin_at_[hidden])
Date: 2003-02-03 09:15:08


Somewhere in the E.U., le 03/02/2003

   Bonjour

In article <001b01c2c942$cd3f08c0$1d00a8c0_at_pdimov2>,
 "Peter Dimov" <pdimov_at_[hidden]> wrote:

> 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)).

      All is fine now. Hopefully this exercice will be helpful to others
(it certainely was for me!).

   Merci

HH


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