This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 108h. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2022-07-01


2130. Over-aligned types in new-expressions

Section: 7.6.2.8  [expr.new]     Status: CD4     Submitter: Richard Smith     Date: 2015-05-28

[Adopted at the February, 2016 meeting.]

According to 7.6.2.8 [expr.new] paragraph 1,

It is implementation-defined whether over-aligned types are supported (6.7.6 [basic.align]).

However, there is no mechanism for informing an allocation function of the required alignment for over-aligned types. Nevertheless, 6.7.6 [basic.align] paragraph 9 says:

Additionally, a request for runtime allocation of dynamic storage for which the requested alignment cannot be honored shall be treated as an allocation failure.

This seems contradictory.

Proposed resolution (October, 2015):

Change 6.7.6 [basic.align] paragraph 9 as follows:

If a request for a specific extended alignment in a specific context is not supported by an implementation, the program is ill-formed. Additionally, a request for runtime allocation of dynamic storage for which the requested alignment cannot be honored shall be treated as an allocation failure.