Created on 2016-12-13.00:00:00 last changed 46 months ago
Proposed resolution:
Change the specification of do_allocate() ([mem.res.private] p2+p3) as follows:
Returns: A derived class shall implement this function to return a pointer to allocated storage (3.7.4.2) with a size of at least bytes, aligned to the specified alignment.
The returned storage is aligned to the specified alignment, if such alignment is supported; otherwise it is aligned to max_align.Throws: A derived class implementation shall throw an appropriate exception if it is unable to allocate memory with the requested size and alignment.
[ 2018-3-17 Adopted in Jacksonville ]
[ 2017-11 Albuquerque Wednesday issue processing ]
Move to Ready.
[ 2017-02-12 Pablo responds and provides wording ]
The original intent was:
However, the description of do_allocate might have gone stale as the aligned-allocation proposal made its way into the standard.
The understanding I take from the definition of extended alignment in (the current text of) 3.11/3 [basic.align] and "assembling an argument list" in 5.3.4/14 [expr.new] is that it is intended that, when allocating space for an object with extended alignment in a well-formed program, the alignment will be honored and will not be truncated to max_align. I think this is a change from earlier drafts of the extended-alignment proposal, where silent truncation to max_align was permitted (I could be wrong). Anyway, it seems wrong to ever ignore the alignment parameter in do_allocate().
[ 2017-01-27 Telecon ]
Priority 3; Marshall to ping Pablo for intent and provide wording.
The specification of do_allocate() ([mem.res.private] p2+p3) says:
Returns: A derived class shall implement this function to return a pointer to allocated storage (3.7.4.2) with a size of at least bytes. The returned storage is aligned to the specified alignment, if such alignment is supported (3.11); otherwise it is aligned to max_align.
Throws: A derived class implementation shall throw an appropriate exception if it is unable to allocate memory with the requested size and alignment.
It is unclear whether a request for an unsupported alignment (e.g. larger than max_align) yields an exception or the returned storage is silently aligned to max_align.
This is editorial issue #966.History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2018-03-18 16:03:30 | admin | set | messages: + msg9726 |
2018-03-18 16:03:30 | admin | set | status: voting -> wp |
2018-02-12 01:13:49 | admin | set | status: ready -> voting |
2017-11-10 03:05:33 | admin | set | messages: + msg9535 |
2017-11-10 03:05:33 | admin | set | status: new -> ready |
2017-02-13 15:10:23 | admin | set | messages: + msg8938 |
2017-02-13 15:10:23 | admin | set | messages: + msg8937 |
2017-01-30 15:36:02 | admin | set | messages: + msg8819 |
2016-12-13 00:00:00 | admin | create |