This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++11 status.
Section: 26.11[specialized.algorithms], 20.3.2.2.7[util.smartptr.shared.create]Status:C++11Submitter: Alberto Ganesh BarbatiOpened: 2008-07-14Last modified: 2016-01-28
Priority:Not Prioritized
View otheractive issues in [specialized.algorithms].
View all otherissues in [specialized.algorithms].
View all issues withC++11 status.
Discussion:
LWG issue402(i) replaced "new" with "::new" in the placementnew-expression in 20.2.10.2[allocator.members]. I believe the rationalegiven in402(i) applies also to the following other contexts:
in 26.11[specialized.algorithms], all four algorithmsunitialized_copy,unitialized_copy_n,unitialized_fill andunitialized_fill_n usethe unqualified placement new-expression in some variation of the form:
new (static_cast<void*>(&*result)) typename iterator_traits<ForwardIterator>::value_type(*first);
in 20.3.2.2.7[util.smartptr.shared.create] there is a reference to the unqualified placement new-expression:
new (pv) T(std::forward<Args>(args)...),
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 explicitlyuse a placement new-expression. Should other uses come out, they shouldbe qualified as well.
As an aside, a qualified placement new-expression does not needadditional requirements to be compiled in a constrained context. Byadding qualification, theHasPlacementNew concept introduced recently inN2677 (Foundational Concepts)would no longer be needed by library andshould therefore be removed.
[San Francisco:]
Detlef: If we move this to Ready, it's likely that we'll forget aboutthe side comment about the
HasPlacementNewconcept.
[post San Francisco:]
Daniel:
HasPlacementNewhas been removed fromN2774 (Foundational Concepts).
Proposed resolution:
Replace "new" with "::new" in: