Robert Bosch interview question

Implement smart pointer in c++