fix c.127 example issue. (#789)

auto will deduce as unique_ptr<D> and the correct destructor will call. Anyway, this should be a bad example.
pull/846/head
teassy000 9 years ago committed by Jonathan Wakely
parent 4d86abfdb4
commit 8a9bb3bc61

@ -6084,7 +6084,7 @@ A class with a virtual function is usually (and in general) used via a pointer t
void use()
{
auto p = make_unique<D>();
unique_ptr<B> p = make_unique<D>();
// ...
} // undefined behavior. May call B::~B only and leak the string

Loading…
Cancel
Save