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.

### 425. return value of std::get_temporary_buffer

Section: 99 [depr.temporary.buffer] Status: CD1 Submitter: Martin Sebor Opened: 2003-09-18 Last modified: 2017-06-15

Priority: Not Prioritized

View all other issues in [depr.temporary.buffer].

View all issues with CD1 status.

Discussion:

The standard is not clear about the requirements on the value returned from a call to get_temporary_buffer(0). In particular, it fails to specify whether the call should return a distinct pointer each time it is called (like operator new), or whether the value is unspecified (as if returned by malloc). The standard also fails to mention what the required behavior is when the argument is less than 0.

Proposed resolution:

Change 21.3.4 [meta.help] paragraph 2 from "...or a pair of 0 values if no storage can be obtained" to "...or a pair of 0 values if no storage can be obtained or if n <= 0."

[Kona: Matt provided wording]