tmp/tmpmrohnbat/{from.md → to.md}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
### Structure of each clause <a id="structure">[[structure]]</a>
|
| 2 |
|
| 3 |
#### Elements <a id="structure.elements">[[structure.elements]]</a>
|
| 4 |
|
| 5 |
-
Each library clause contains the following elements, as applicable:[^
|
| 6 |
|
| 7 |
- Summary
|
| 8 |
- Requirements
|
| 9 |
- Detailed specifications
|
| 10 |
- References to the C standard library
|
|
@@ -69,11 +69,11 @@ Template argument requirements are sometimes referenced by name. See
|
|
| 69 |
[[type.descriptions]].
|
| 70 |
|
| 71 |
In some cases the semantic requirements are presented as C++ code. Such
|
| 72 |
code is intended as a specification of equivalence of a construct to
|
| 73 |
another construct, not necessarily as the way the construct must be
|
| 74 |
-
implemented.[^
|
| 75 |
|
| 76 |
Required operations of any concept defined in this document need not be
|
| 77 |
total functions; that is, some arguments to a required operation may
|
| 78 |
result in the required semantics failing to be met.
|
| 79 |
|
|
@@ -97,43 +97,49 @@ The detailed specifications each contain the following elements:
|
|
| 97 |
- restrictions on template arguments, if any
|
| 98 |
- description of class invariants
|
| 99 |
- description of function semantics
|
| 100 |
|
| 101 |
Descriptions of class member functions follow the order (as
|
| 102 |
-
appropriate):[^
|
| 103 |
|
| 104 |
- constructor(s) and destructor
|
| 105 |
- copying, moving & assignment functions
|
| 106 |
-
- comparison functions
|
| 107 |
- modifier functions
|
| 108 |
- observer functions
|
| 109 |
- operators and other non-member functions
|
| 110 |
|
| 111 |
Descriptions of function semantics contain the following elements (as
|
| 112 |
-
appropriate):[^
|
| 113 |
|
| 114 |
- *Constraints:* the conditions for the function’s participation in
|
| 115 |
overload resolution [[over.match]]. \[*Note 1*: Failure to meet such a
|
| 116 |
condition results in the function’s silent
|
| 117 |
-
non-viability. — *end note*] \[*Example 1*: An implementation
|
| 118 |
express such a condition via a *constraint-expression*
|
| 119 |
[[temp.constr.decl]]. — *end example*]
|
| 120 |
- *Mandates:* the conditions that, if not met, render the program
|
| 121 |
-
ill-formed. \[*Example 2*: An implementation
|
| 122 |
condition via the *constant-expression* in a
|
| 123 |
*static_assert-declaration* [[dcl.pre]]. If the diagnostic is to be
|
| 124 |
emitted only after the function has been selected by overload
|
| 125 |
-
resolution, an implementation
|
| 126 |
*constraint-expression* [[temp.constr.decl]] and also define the
|
| 127 |
function as deleted. — *end example*]
|
| 128 |
- *Preconditions:* the conditions that the function assumes to hold
|
| 129 |
-
whenever it is called
|
|
|
|
| 130 |
- *Effects:* the actions performed by the function.
|
| 131 |
- *Synchronization:* the synchronization operations
|
| 132 |
[[intro.multithread]] applicable to the function.
|
| 133 |
- *Ensures:* the conditions (sometimes termed observable results)
|
| 134 |
established by the function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
- *Returns:* a description of the value(s) returned by the function.
|
| 136 |
- *Throws:* any exceptions thrown by the function, and the conditions
|
| 137 |
that would cause the exception.
|
| 138 |
- *Complexity:* the time and/or space complexity of the function.
|
| 139 |
- *Remarks:* additional semantic constraints on the function.
|
|
@@ -163,11 +169,11 @@ definition provided by the implementation. The *required behavior*
|
|
| 163 |
describes the semantics of a function definition provided by either the
|
| 164 |
implementation or a C++ program. Where no distinction is explicitly made
|
| 165 |
in the description, the behavior described is the required behavior.
|
| 166 |
|
| 167 |
If the formulation of a complexity requirement calls for a negative
|
| 168 |
-
number of operations, the actual requirement is zero operations.[^
|
| 169 |
|
| 170 |
Complexity requirements specified in the library clauses are upper
|
| 171 |
bounds, and implementations that provide better complexity guarantees
|
| 172 |
meet the requirements.
|
| 173 |
|
|
|
|
| 1 |
### Structure of each clause <a id="structure">[[structure]]</a>
|
| 2 |
|
| 3 |
#### Elements <a id="structure.elements">[[structure.elements]]</a>
|
| 4 |
|
| 5 |
+
Each library clause contains the following elements, as applicable:[^2]
|
| 6 |
|
| 7 |
- Summary
|
| 8 |
- Requirements
|
| 9 |
- Detailed specifications
|
| 10 |
- References to the C standard library
|
|
|
|
| 69 |
[[type.descriptions]].
|
| 70 |
|
| 71 |
In some cases the semantic requirements are presented as C++ code. Such
|
| 72 |
code is intended as a specification of equivalence of a construct to
|
| 73 |
another construct, not necessarily as the way the construct must be
|
| 74 |
+
implemented.[^3]
|
| 75 |
|
| 76 |
Required operations of any concept defined in this document need not be
|
| 77 |
total functions; that is, some arguments to a required operation may
|
| 78 |
result in the required semantics failing to be met.
|
| 79 |
|
|
|
|
| 97 |
- restrictions on template arguments, if any
|
| 98 |
- description of class invariants
|
| 99 |
- description of function semantics
|
| 100 |
|
| 101 |
Descriptions of class member functions follow the order (as
|
| 102 |
+
appropriate):[^4]
|
| 103 |
|
| 104 |
- constructor(s) and destructor
|
| 105 |
- copying, moving & assignment functions
|
| 106 |
+
- comparison operator functions
|
| 107 |
- modifier functions
|
| 108 |
- observer functions
|
| 109 |
- operators and other non-member functions
|
| 110 |
|
| 111 |
Descriptions of function semantics contain the following elements (as
|
| 112 |
+
appropriate):[^5]
|
| 113 |
|
| 114 |
- *Constraints:* the conditions for the function’s participation in
|
| 115 |
overload resolution [[over.match]]. \[*Note 1*: Failure to meet such a
|
| 116 |
condition results in the function’s silent
|
| 117 |
+
non-viability. — *end note*] \[*Example 1*: An implementation can
|
| 118 |
express such a condition via a *constraint-expression*
|
| 119 |
[[temp.constr.decl]]. — *end example*]
|
| 120 |
- *Mandates:* the conditions that, if not met, render the program
|
| 121 |
+
ill-formed. \[*Example 2*: An implementation can express such a
|
| 122 |
condition via the *constant-expression* in a
|
| 123 |
*static_assert-declaration* [[dcl.pre]]. If the diagnostic is to be
|
| 124 |
emitted only after the function has been selected by overload
|
| 125 |
+
resolution, an implementation can express such a condition via a
|
| 126 |
*constraint-expression* [[temp.constr.decl]] and also define the
|
| 127 |
function as deleted. — *end example*]
|
| 128 |
- *Preconditions:* the conditions that the function assumes to hold
|
| 129 |
+
whenever it is called; violation of any preconditions results in
|
| 130 |
+
undefined behavior.
|
| 131 |
- *Effects:* the actions performed by the function.
|
| 132 |
- *Synchronization:* the synchronization operations
|
| 133 |
[[intro.multithread]] applicable to the function.
|
| 134 |
- *Ensures:* the conditions (sometimes termed observable results)
|
| 135 |
established by the function.
|
| 136 |
+
- *Result:* for a *typename-specifier*, a description of the named type;
|
| 137 |
+
for an *expression*, a description of the type of the expression; the
|
| 138 |
+
expression is an lvalue if the type is an lvalue reference type, an
|
| 139 |
+
xvalue if the type is an rvalue reference type, and a prvalue
|
| 140 |
+
otherwise.
|
| 141 |
- *Returns:* a description of the value(s) returned by the function.
|
| 142 |
- *Throws:* any exceptions thrown by the function, and the conditions
|
| 143 |
that would cause the exception.
|
| 144 |
- *Complexity:* the time and/or space complexity of the function.
|
| 145 |
- *Remarks:* additional semantic constraints on the function.
|
|
|
|
| 169 |
describes the semantics of a function definition provided by either the
|
| 170 |
implementation or a C++ program. Where no distinction is explicitly made
|
| 171 |
in the description, the behavior described is the required behavior.
|
| 172 |
|
| 173 |
If the formulation of a complexity requirement calls for a negative
|
| 174 |
+
number of operations, the actual requirement is zero operations.[^6]
|
| 175 |
|
| 176 |
Complexity requirements specified in the library clauses are upper
|
| 177 |
bounds, and implementations that provide better complexity guarantees
|
| 178 |
meet the requirements.
|
| 179 |
|