319. Storage allocation wording confuses "Required behavior", "Requires"

Section: 21.6.2.1 [new.delete.single], 21.6.2.2 [new.delete.array] Status: CD1 Submitter: Beman Dawes Opened: 2001-05-15 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [new.delete.single].

View all issues with CD1 status.

Discussion:

The standard specifies 20.4.1.4 [structure.specifications] that "Required behavior" elements describe "the semantics of a function definition provided by either the implementation or a C++ program."

The standard specifies 20.4.1.4 [structure.specifications] that "Requires" elements describe "the preconditions for calling the function."

In the sections noted below, the current wording specifies "Required Behavior" for what are actually preconditions, and thus should be specified as "Requires".

Proposed resolution:

In 21.6.2.1 [new.delete.single] Para 12 Change:

Required behavior: accept a value of ptr that is null or that was returned by an earlier call ...

to:

Requires: the value of ptr is null or the value returned by an earlier call ...

In 21.6.2.2 [new.delete.array] Para 11 Change:

Required behavior: accept a value of ptr that is null or that was returned by an earlier call ...

to:

Requires: the value of ptr is null or the value returned by an earlier call ...