mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Fixing tagged union example (#1301)
It did not compile previously due to missing type specifier on placement new.
This commit is contained in:
committed by
Jonathan Wakely
parent
d822f80d5d
commit
f971ad2f17
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user