I would like to hold a shared_ptr of a template class. However, I don't want to make the class B as a template class too. In my understanding, shared_ptr with any type will have the same memory layout. So I am wondering any workaround in this scenario?
template<T>
class A {
...
};
class B {
...
std::shared_ptr<A<T>> ptr;
}