#include
#include
using namespace std;
int main()
{
std::unique_ptr<int> p(new int);
int x = 5;
*p = 11;
auto y = [p = std::move(p)]() { std::cout << "inside: " << *p << "\n"; };
y();
std::cout << "outside: " << *p << "\n";
/*
std::shared_ptr p = std::make_shared(4);
*p = 11;
auto y = &p = std::move§{*p = 152; };
y();
cout << *p << endl;
*/
system(“pause”);
return 0;
}