This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.

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

Section: 17.7.3.2 [new.delete.single], 17.7.3.3 [new.delete.array] Status: CD1 Submitter: Beman Dawes Opened: 2001-05-15 Last modified: 2016-01-28

Priority: Not Prioritized

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

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

View all issues with CD1 status.

Discussion:

The standard specifies 16.3.2.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 16.3.2.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 17.7.3.2 [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 17.7.3.3 [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 ...