
No idea. :-)
Me neither, it's rather complicated to follow lambda inner workings.
I see... then a get_pointer overload won't work either, since you can't return a raw pointer from it, and shared_ptr doesn't define operator->*. If you can't cache the shared_ptr locally in aux, the only remaining option is two nested binds.
I'm almost giving up. To sum up what we've got so far, I've written this
code
// To mimic c++0x auto type (with help of g++'s typeof)
#define auto(var, def) typeof(def) var = def
struct aux
{
aux() : b(1) {}
int a() const { return 5; }
int b;
};
int main()
{
aux a;
// This compiles and executes as expected, we're dealing with a pointer
to an attribute.
boost::function