#include #include #include using namespace std; //unique_ptr class student { public: int id ; student( int idP ) { id = idP ; cout << "Constructor called for ;" << id << endl ; } student( const student& obj1 ) { id = obj1.id ; cout << "Copy Constructor called for ;" << id << endl ; } ~student( ) { cout << "Destructor called for ;" << id << endl ; } }; int main() { std::unique_ptr valuePtr( new student(1) ) ; cout << "Student id:" << (*valuePtr).id << endl ; }