Reason:
contains a STD ::unique_ptr.
A std::unique_ptr cannot be copied
or
contains a std::shared_ptr
A std::unique_ptr cannot be copied
Solutions:
To:
//cpp1
class B{
A::getPTR(target_ptr)
}
//cpp2
class A{
getPTR(const B& target_ptr)
{
std::shared_ptr<B> copied_ptr = std::make_shared<B>(target_ptr);
}
}
target_ptr:is the ptr you want to copy.
Copied ptr: is the ptr you copied