Movatterモバイル変換


[0]ホーム

URL:



This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++11 status.

1285.allocator_traits call tonew

Section: 20.2.9.3[allocator.traits.members]Status:C++11Submitter: Howard HinnantOpened: 2009-12-10Last modified: 2016-01-28

Priority:Not Prioritized

View all otherissues in [allocator.traits.members].

View all issues withC++11 status.

Discussion:

LWG issue402(i) added "::" to the call tonewwithinallocator::construct. I suspect we want to retain that fix.

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

Proposed resolution:

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

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

Change 20.2.9.3[allocator.traits.members], p4:

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

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


[8]ページ先頭

©2009-2026 Movatter.jp