866. Qualification of placement new-expressions

Section: 23.10.11 [specialized.algorithms], [util.smartptr.shared.create] Status: C++11 Submitter: Alberto Ganesh Barbati Opened: 2008-07-14 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [specialized.algorithms].

View all issues with C++11 status.


LWG issue 402 replaced "new" with "::new" in the placement new-expression in [allocator.members]. I believe the rationale given in 402 applies also to the following other contexts:

I suggest to add qualification in all those places. As far as I know, these are all the remaining places in the whole library that explicitly use a placement new-expression. Should other uses come out, they should be qualified as well.

As an aside, a qualified placement new-expression does not need additional requirements to be compiled in a constrained context. By adding qualification, the HasPlacementNew concept introduced recently in N2677 (Foundational Concepts) would no longer be needed by library and should therefore be removed.

[ San Francisco: ]

Detlef: If we move this to Ready, it's likely that we'll forget about the side comment about the HasPlacementNew concept.

[ post San Francisco: ]

Daniel: HasPlacementNew has been removed from N2774 (Foundational Concepts).

Proposed resolution:

Replace "new" with "::new" in: