[structure.specifications] (original) (raw)

16 Library introduction [library]

16.3 Method of description [description]

16.3.2 Structure of each clause [structure]

16.3.2.4 Detailed specifications [structure.specifications]

The detailed specifications each contain the following elements:

Descriptions of class member functions follow the order (as appropriate):126

Descriptions of function semantics contain the following elements (as appropriate):127

Whenever the Effects element specifies that the semantics of some functionF are Equivalent to some code sequence, then the various elements are interpreted as follows.

If F's semantics specifies any Constraints or Mandates elements, then those requirements are logically imposed prior to the equivalent-to semantics.

Next, the semantics of the code sequence are determined by the_Constraints_,Mandates,Constant When,Preconditions,Hardened preconditions,Effects,Synchronization,Postconditions,Returns,Throws,Complexity,Remarks, and_Error conditions_specified for the function invocations contained in the code sequence.

The value returned from F is specified by F's Returns element, or if F has no Returns element, a non-void return from F is specified by thereturn statements ([stmt.return]) in the code sequence.

If F's semantics contains a Throws,Postconditions, or Complexity element, then that supersedes any occurrences of that element in the code sequence.

For non-reserved replacement and handler functions,[support] specifies two behaviors for the functions in question: their required and default behavior.

The default behaviordescribes a function definition provided by the implementation.

The required behaviordescribes 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.

If the formulation of a complexity requirement calls for a negative number of operations, the actual requirement is zero operations.128

Complexity requirements specified in the library clauses are upper bounds, and implementations that provide better complexity guarantees meet the requirements.

Error conditions specify conditions where a function may fail.

The conditions are listed, together with a suitable explanation, as the enum class errcconstants ([syserr]).