In the macro SWIG_SHARED_PTR_DERIVED in the file shared_ptr.i there is a bug that appear when trying to wrapp c++ code that uses std::tr1::shared_ptr. Setting:
#define SWIG_SHARED_PTR_NAMESPACE std
#define SWIG_SHARED_PTR_SUBNAMESPACE tr1
will not produce the right code from the macro. The macro refer to SWIG_SHARED_PTR_NAMESPACE instead of SWIG_SHARED_PTR_QNAMESPACE.
A patch that resolves the bug is provided.