id summary reporter owner description type status milestone component version severity resolution keywords cc 5686 Member function and member variable pointers don't work well with shared_ptr patvarilly@… Peter Dimov "The current implementation of shared_ptr doesn't overload operator->*, so member function and member variable pointers don't play nicely with shared_ptrs. I would imagine that this is trivial to fix given the existing operator-> implementation. Here's an example of what doesn't work but should: {{{ #!cpp class A { public: int memberA; } ... int A::*memberVariablePtr = &A::memberA; shared_ptr ASharedPtr( ... ); // The following two pieces of code should be functionally identical // 1) Doesn't compile. Error in g++: ""base operand of -> is not a pointer"" // It took me a while to figure out what g++ was complaining about int val = ASharedPtr->*memberVariablePtr; // 2) Compiles and works just fine int val = ASharedPtr.get()->*memberVariablePtr; }}} Note: I tried this with version 1.45.0, but looked up the documentation of shared_ptr in 1.46.1 to make sure that this hasn't already been addressed." Bugs closed To Be Determined smart_ptr Boost 1.45.0 Problem wontfix shared_ptr pointer-to-member