Created attachment 404 [details] Proposed patch file for 3.2.0 When we use a custom Scalar type that require initialization (like std::shared_ptr), the sparse matrix classes do not work correctly. The problem is that some classes in SparseCore use memcpy() and memmove() functions, which breaks the C++ object semantics. I found smart_copy function in Core/Memory.h, which seems currently abandoned, but perfectly suitable for replacing these memcpy()s. As a replacement of memmove(), I make an extension to smart_copy, which detects overlapping region and uses C++11 move semantics if applicable. Attached please find a proposed patch that replaces all memcpy() into smart_copy.
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/710.