Commit acf0fd8e3fed6c2b1d446267077ae9118aadde30
1 parent
7e10c6d3
Fixed comment in placement new
Showing
1 changed file
with
0 additions
and
1 deletions
examples11/02-new/placementnew2.cpp
... | ... | @@ -8,7 +8,6 @@ main () |
8 | 8 | { |
9 | 9 | std::aligned_storage_t<sizeof(string), alignof(string)> buf; |
10 | 10 | string *s = new (&buf) string; // construct an string at .buf;. invokes: operator new(sizeof(string),buf); |
11 | - // actually undefined behaviour - alignment restrictions might not be fulfilled | |
12 | 11 | *s = "hello"; |
13 | 12 | cout << *s << endl; |
14 | 13 | s->~string(); | ... | ... |