id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12275,"bind fwds shared_ptr twice, invokes memfn with nullptr",Jason Mancini ,Peter Dimov,"Behavior started in 1.60, due to bind/bind.hpp changes around forwarding and rvalues. Short sample is shown below. This limitation needs to be mentioned in the boost docs, or somehow alter bind to work like before. Bind 1.59 would print the ptr address twice. Bind 1.60 gets a nullptr on the second memfn call. Quick fix for this sample is to change tFunc to use shared_ptr<...>const& such that it can't be forwarded. {{{ #include #include #include #include #include using namespace boost; using tFunc = function)>; struct Obj { bool MF() const { printf(""this %p\n"", this); return true; } }; int main() { shared_ptr sptr = make_shared(); tFunc BB; BB = bind(&Obj::MF, _1); BB = bind(BB, _1) && bind(&Obj::MF, _1); BB(sptr); } }}} Boost 1.59 {{{ this 0x117fc39 this 0x117fc39 }}} Boost 1.60 {{{ this 0x117fc39 this (nil) }}} ",Bugs,closed,To Be Determined,bind,Boost 1.61.0,Problem,fixed,,