From f971ad2f179cf9740463306df706a70b0ffe0daa Mon Sep 17 00:00:00 2001 From: Marzo Sette Torres Junior Date: Wed, 19 Dec 2018 16:52:05 +0100 Subject: [PATCH] Fixing tagged union example (#1301) It did not compile previously due to missing type specifier on placement new. --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 7d5aeea..fc53992 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -8608,7 +8608,7 @@ Saving programmers from having to write such code is one reason for including `v i = e.i; break; case Tag::text: - new(&s)(e.s); // placement new: explicit construct + new(&s) string(e.s); // placement new: explicit construct type = e.type; }