Hacker News new | ask | show | jobs
by ar15saveslives 3528 days ago
How does it happen? Non-const unique_ptr& used as a function parameter?
1 comments

I can simplify your example:

  unique_ptr<int> p;
  auto n = *p; // C++ kills!