From 8a9bb3bc61a97aaf9a649e07dcdeaa28daf20407 Mon Sep 17 00:00:00 2001 From: teassy000 Date: Tue, 31 Jan 2017 03:32:41 +0800 Subject: [PATCH] fix c.127 example issue. (#789) auto will deduce as unique_ptr and the correct destructor will call. Anyway, this should be a bad example. --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index e472f18..a5b8c56 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -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(); + unique_ptr p = make_unique(); // ... } // undefined behavior. May call B::~B only and leak the string