Boost logo

Boost Users :

From: me22 (me22.ca_at_[hidden])
Date: 2005-03-30 00:15:25


On Tue, 29 Mar 2005 22:30:43 -0500, Sean DeNigris
<lotusone_at_[hidden]> wrote:
>
> Can anyone explain why the class member functions need their address taken
> when used in a boost::lambda::bind inside the class?
>

Are you sure MyClass::DoSomething is legal C++ for getting a pointer
to a member function?

A google for "C++ member function pointer" lead me to
http://linuxquality.sunsite.dk/articles/memberpointers/ which states
the following:
"For regular function pointers, it is optional to use the address-of
operator & when taking the address of a function, but it is required
for taking the address of member functions. g++ will compile source
that leaves it out, but emits a warning."

- Scott McMurray


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