Hi,

The code in construct()  seems to surfer from copy/paste or merge error.
It seems as though the following lines are duplicated in the else clause:
      void *const storage = ((converter::rvalue_from_python_storage<SP<T> >*)data)->storage.bytes;
      // Deal with the "None" case.
      if (data->convertible == source)
        new (storage) SP<T>();
Please take a look at:
https://www.boost.org/doc/libs/1_82_0/boost/python/converter/shared_ptr_from_python.hpp



Ran.