Title
Alignment and placement new
Status
dup
Section
17.6.3.4 [new.delete.placement]
Submitter
Herb Sutter

Created on 1998-12-15.00:00:00 last changed 294 months ago

Messages

Date: 1999-10-15.00:00:00

Rationale (10/99): This is an issue for the Library Working Group.

Date: 2022-02-18.07:47:23

The example in 17.6.3.4 [new.delete.placement] reads:

[Example: This can be useful for constructing an object at a known address:
    char place[sizeof(Something)];
    Something* p = new (place) Something();
end example]
This example has potential alignment problems. One way to correct it would be to change the definition of place to read:
    char* place = new char[sizeof(Something)];

Rationale (10/99): This is an issue for the Library Working Group.

History
Date User Action Args
2000-02-23 00:00:00adminsetmessages: + msg278
2000-02-23 00:00:00adminsetstatus: open -> dup
1998-12-15 00:00:00admincreate