Boost logo

Boost :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2005-07-22 12:21:40


> #include <boost/lambda/bind.hpp>

#include <boost/mem_fn.hpp>

>
> struct S{
> void mfn1(){};
> void mfn2() throw() {};
> };
// remove those ; at the end of the function definitions

>
> int main()
> {
> using namespace boost::lambda;
using namespace boost;
>
> S s;
> bind(&S::mfn1,_1)(s); // OK
// bind(&S::mfn2,_1)(s); // Error with VC71
      bind(mem_fn(&S::mfn2),_1)(s); // This worked with me
> }
>

using VC7.1 it worked for me.

I dont know, but lambda doesnt need mem_fn for member functions(at
least for the ones without exception specification)?

-- 
   Felipe Magno de Almeida
Developer from synergy and Computer Science student from State
University of Campinas(UNICAMP).
Unicamp: http://www.ic.unicamp.br
Synergy: http://www.synergy.com.br
"There is no dark side of the moon really. Matter of fact it's all dark."

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