Re:Writing comments about pointer ownership
by ridiculous_fish on Sunday August 23, 2015 @07:20PM
(#10107125)
That doesn't sound right. unique_ptr does not have a copy constructor so there should not be an implicit copy ctor (am I right?) Exception handling in the default ctor I think is right.
Intention is to avoid undefined behaviour in situation where you delete an object with incomplete class type at the point of deletion, that has a non-trivial destructor or a deallocation function.
Edit: An deleter is used because of default generated copy constructor.