Created on 2020-07-27.00:00:00 last changed 1 month ago
This wording is relative to N4861.
[Drafting note: The proposed wording is inspired by the example given in the "Assertion/note" column of the expression a.allocate(n) in table [tab:cpp17.allocator].]
Modify [mem.res.public] as indicated:
[[nodiscard]] void* allocate(size_t bytes, size_t alignment = max_align);
-2- Effects: Equivalent to:
return do_allocate(bytes, alignment);
[ 2020-08-21; Reflector prioritization ]
Set priority to 3 after reflector discussions.
[ 2020-08-03; Billy comments ]
It's worth noting that the resolution of CWG 2382 has impact on implementors for this issue.
With the adoption of P0593R6 in Prague, std::ptr::polymorphic_allocator no longer satisfies the of Cpp17Allocator requirements. Specifically, all calls to allocate(n) need to create an object for an array of n Ts (but not initialize any of those elements). std::pmr::polymorphic_allocator calls its underlying memory resource to allocate sufficient bytes of storage, but it does not create (and start the lifetime of) the array object within that storage.
|2020-08-21 13:34:21||admin||set||messages: + msg11438|
|2020-08-03 19:47:49||admin||set||messages: + msg11431|
|2020-08-02 17:02:36||admin||set||messages: + msg11425|