This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TC1 status.
Section: 220.127.116.11 [new.delete.placement] Status: TC1 Submitter: Steve Clamage Opened: 1998-10-28 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [new.delete.placement].
View all issues with TC1 status.
Duplicate of: 196
Section 18.104.22.168 contains the following example:
[Example: This can be useful for constructing an object at a known address: char place[sizeof(Something)]; Something* p = new (place) Something(); -end example]
First code line: "place" need not have any special alignment, and the following constructor could fail due to misaligned data.
Second code line: Aren't the parens on Something() incorrect? [Dublin: the LWG believes the () are correct.]
Examples are not normative, but nevertheless should not show code that is invalid or likely to fail.
Replace the first line of code in the example in 22.214.171.124 [new.delete.placement] with:
void* place = operator new(sizeof(Something));