reset()
takes a pointer.
What you seem to want is simple move assignment:
#include <memory>
using namespace std;
int main() {
unique_ptr<int[]> p = make_unique<int[]>(3);
p = make_unique<int[]>(10);
}
some compilers might still like you to specify the std::move()
there, but it's not strictly required.