1 The problem is not related to shared_ptr<>, but occurs already for ordinary pointers:
template
void foo(std::vector);
int a,b;
std::vector bar={&a,&b};
foo??>(bar); // no value for ??? works
2 The construct vector> is sensibly only iff there is no owner to the objects hold.