You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include<memory>
#include<vector>structS {
std::vector<int> v;
};
intmain() {
auto p = std::make_shared<S>();
p->v.push_back(1);
auto a = std::shared_ptr<int>(p, &p->v[0]);
}
It's valid and works with shared_ptr, but is currently not allowed by ptr_to. I.e. they do not expose equivalent functionality.