Ожидаемое поведение заключается в том, что необработанный указатель (newEntry) станет nullptr после вызова lp.reset(), может ли кто-нибудь объяснить, почему newEntry все еще содержит данные?
#include
#include
#include
#include
struct Entry{
Entry(std::string name, int phone):name(name),phone(phone){}
std::string name;
int phone;
~Entry(){
std::cerr
Подробнее здесь: https://stackoverflow.com/questions/798 ... a-unique-p
Мобильная версия