Document: N2678=08-0188
Date: 2008-06-13
Authors: Jeff
Garland
<[email protected]>
Nick
Stoughton <[email protected]>
Benjamin Kosnik <[email protected]>
Beman Dawes <[email protected]>
Motivation
Proposed Wording
Change
17.3.1.3 Specifications
[structure.specifications], paragraph 3, as indicated:
Descriptions of function semantics contain the
following elements (as appropriate):153)
— Requires: the preconditions for calling the function
— Effects: the actions performed by the function
— Postconditions: the observable results established by the
function
— Returns: a description of the value(s) returned by the
function
— Throws: any exceptions thrown by the function, and the
conditions that would cause the exception
— Complexity: the time and/or space complexity of the
function
— Remarks: additional semantic constraints on the function
— Error
conditions: the error conditions for error codes reported by the
function.
For non-reserved replacement and handler functions, clause 18 specifies two behaviors for the functions in question: their required and default behavior. The default behavior describes a function definition provided by the implementation. The required behavior describes the semantics of a function definition provided by either the implementation or a C++ program. Where no distinction is explicitly made in the description, the behavior described is the required behavior.
Complexity requirements specified in the library
clauses are upper bounds, and implementations that provide better
complexity guarantees satisfy the requirements.
Error conditions
specify conditions where a function may fail. The conditions are listed, together
with a suitable explanation, as the enum class errc
constants ([syserr]) that could be
used as an argument to function make_error_condition
([syserr.errcondition.nonmember
Error
conditions:
* resource_unavailable_try_again -
The
system lacked the necessary resources to create another thread, or the
system-imposed limit on the total number of threads in
a process would be exceeded.
join
description as
follows:Acknowedgements
Special thanks to Anthony Williams for reviewing drafts and clarifying error specifications.