#include void smart() { auto ptr = std::make_unique(42); // automatically cleaned up by unique_ptr destructor }