4 ms·
How does it happen? Non-const unique_ptr& used as a function parameter?
by ar15saveslives 10y ago
How does it happen? Non-const unique_ptr& used as a function parameter?
- steveklabnik 10y agohttp://www.steveklabnik.com/uniq_ptr_problem/ http://www.steveklabnik.com/uniq_ptr_problem/
- ar15saveslives 10y agoI can simplify your example: unique_ptr<int> p; auto n = *p; // C++ kills!