Title
allocator_traits call to new
Status
c++11
Section
[allocator.traits.members]
Submitter
Howard Hinnant

Created on 2009-12-10.00:00:00 last changed 161 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change [allocator.requirements], table 40 "Allocator requirements":

Table 40 — Allocator requirements
Expression Return type Assertion/note
pre-/post-condition
Default
a.construct(c,args) (not used) Effect: Constructs an object of type C at c ::new ((void*)c) C(forward<Args>(args)...)

Change [allocator.traits.members], p4:

template <class T, class... Args>
  static void construct(Alloc& a, T* p, Args&&... args);

4 Effects: calls a.construct(p, std::forward<Args>(args)...) if that call is well-formed; otherwise, invokes ::new (static_cast<void*>(p)) T(std::forward<Args>(args)...).

Date: 2009-12-13.00:00:00

[ 2009-12-13 Moved to Tentatively Ready after 7 positive votes on c++std-lib. ]

Date: 2009-12-10.00:00:00

LWG issue 402 added "::" to the call to new within allocator::construct. I suspect we want to retain that fix.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg1451
2010-10-21 18:28:33adminsetmessages: + msg1450
2009-12-10 00:00:00admincreate