Is it possible to use make_shared and a custom deleter for an array that a shared_ptr<> points to (below is the way I tried doing it via the constructor, but I have no idea how that would work via using make_shared)?
int n = 5;
shared_ptr<int> a(new int[n], default_delete<int[]>());
What I would like to make it look like is something similar to this, but with allocating memory for an int array and also having a custom deleter. Is that possible?
int n = 5;
shared_ptr<int> a;
a = make_shared<int>();