tmp/tmpfq21gdsq/{from.md → to.md}
RENAMED
|
@@ -9,35 +9,43 @@ Although this document states only requirements on C++ implementations,
|
|
| 9 |
those requirements are often easier to understand if they are phrased as
|
| 10 |
requirements on programs, parts of programs, or execution of programs.
|
| 11 |
Such requirements have the following meaning:
|
| 12 |
|
| 13 |
- If a program contains no violations of the rules in [[lex]] through
|
| 14 |
-
[[
|
| 15 |
-
|
| 16 |
-
|
| 17 |
- If a program contains a violation of a rule for which no diagnostic is
|
| 18 |
required, this document places no requirement on implementations with
|
| 19 |
respect to that program.
|
| 20 |
-
- Otherwise, if a program contains
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
| 22 |
“conditionally-supported” when the implementation does not support
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
[*Note 1*: During template argument deduction and substitution, certain
|
| 27 |
constructs that in other contexts require a diagnostic are treated
|
| 28 |
differently; see [[temp.deduct]]. — *end note*]
|
| 29 |
|
| 30 |
-
Furthermore, a conforming implementation
|
| 31 |
|
| 32 |
-
-
|
| 33 |
-
|
| 34 |
-
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
|
| 40 |
For classes and class templates, the library Clauses specify partial
|
| 41 |
definitions. Private members [[class.access]] are not specified, but
|
| 42 |
each implementation shall supply them to complete the definitions
|
| 43 |
according to the description in the library Clauses.
|
|
@@ -54,23 +62,38 @@ header or importing the appropriate standard library named header unit
|
|
| 54 |
The templates, classes, functions, and objects in the library have
|
| 55 |
external linkage [[basic.link]]. The implementation provides definitions
|
| 56 |
for standard library entities, as necessary, while combining translation
|
| 57 |
units to form a complete C++ program [[lex.phases]].
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
which execution may take place without the benefit of an operating
|
| 62 |
system. A hosted implementation supports all the facilities described in
|
| 63 |
this document, while a freestanding implementation supports the entire
|
| 64 |
-
C++ language described in [[lex]] through [[
|
| 65 |
-
library facilities described in [[compliance]].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
A conforming implementation may have extensions (including additional
|
| 68 |
library functions), provided they do not alter the behavior of any
|
| 69 |
well-formed program. Implementations are required to diagnose programs
|
| 70 |
that use such extensions that are ill-formed according to this document.
|
| 71 |
Having done so, however, they can compile and execute such programs.
|
| 72 |
|
| 73 |
Each implementation shall include documentation that identifies all
|
| 74 |
conditionally-supported constructs that it does not support and defines
|
| 75 |
-
all locale-specific characteristics.[^
|
| 76 |
|
|
|
|
| 9 |
those requirements are often easier to understand if they are phrased as
|
| 10 |
requirements on programs, parts of programs, or execution of programs.
|
| 11 |
Such requirements have the following meaning:
|
| 12 |
|
| 13 |
- If a program contains no violations of the rules in [[lex]] through
|
| 14 |
+
[[exec]] as well as those specified in [[depr]], a conforming
|
| 15 |
+
implementation shall accept and correctly execute[^2] that program,
|
| 16 |
+
except when the implementation’s limitations (see below) are exceeded.
|
| 17 |
- If a program contains a violation of a rule for which no diagnostic is
|
| 18 |
required, this document places no requirement on implementations with
|
| 19 |
respect to that program.
|
| 20 |
+
- Otherwise, if a program contains
|
| 21 |
+
- a violation of any diagnosable rule,
|
| 22 |
+
- a preprocessing translation unit with a `#warning` preprocessing
|
| 23 |
+
directive [[cpp.error]],
|
| 24 |
+
- an occurrence of a construct described in this document as
|
| 25 |
“conditionally-supported” when the implementation does not support
|
| 26 |
+
that construct, or
|
| 27 |
+
- a contract assertion [[basic.contract.eval]] evaluated with a
|
| 28 |
+
checking semantic in a manifestly constant-evaluated context
|
| 29 |
+
[[expr.const]] resulting in a contract violation,
|
| 30 |
+
|
| 31 |
+
a conforming implementation shall issue at least one diagnostic
|
| 32 |
+
message.
|
| 33 |
|
| 34 |
[*Note 1*: During template argument deduction and substitution, certain
|
| 35 |
constructs that in other contexts require a diagnostic are treated
|
| 36 |
differently; see [[temp.deduct]]. — *end note*]
|
| 37 |
|
| 38 |
+
Furthermore, a conforming implementation shall not accept
|
| 39 |
|
| 40 |
+
- a preprocessing translation unit containing a `#error` preprocessing
|
| 41 |
+
directive [[cpp.error]],
|
| 42 |
+
- a translation unit with a *static_assert-declaration* that fails
|
| 43 |
+
[[dcl.pre]], or
|
| 44 |
+
- a contract assertion evaluated with a terminating semantic
|
| 45 |
+
[[basic.contract.eval]] in a manifestly constant-evaluated context
|
| 46 |
+
[[expr.const]] resulting in a contract violation.
|
| 47 |
|
| 48 |
For classes and class templates, the library Clauses specify partial
|
| 49 |
definitions. Private members [[class.access]] are not specified, but
|
| 50 |
each implementation shall supply them to complete the definitions
|
| 51 |
according to the description in the library Clauses.
|
|
|
|
| 62 |
The templates, classes, functions, and objects in the library have
|
| 63 |
external linkage [[basic.link]]. The implementation provides definitions
|
| 64 |
for standard library entities, as necessary, while combining translation
|
| 65 |
units to form a complete C++ program [[lex.phases]].
|
| 66 |
|
| 67 |
+
An implementation is either a *hosted implementation* or a
|
| 68 |
+
*freestanding implementation*. A freestanding implementation is one in
|
| 69 |
which execution may take place without the benefit of an operating
|
| 70 |
system. A hosted implementation supports all the facilities described in
|
| 71 |
this document, while a freestanding implementation supports the entire
|
| 72 |
+
C++ language described in [[lex]] through [[\lastcorechapter]] and the
|
| 73 |
+
subset of the library facilities described in [[compliance]].
|
| 74 |
+
|
| 75 |
+
It is *implementation-defined* whether the implementation is a
|
| 76 |
+
*hardened implementation*. If it is a hardened implementation, violating
|
| 77 |
+
a hardened precondition results in a contract violation
|
| 78 |
+
[[structure.specifications]].
|
| 79 |
+
|
| 80 |
+
An implementation is encouraged to document its limitations in the size
|
| 81 |
+
or complexity of the programs it can successfully process, if possible
|
| 82 |
+
and where known. [[implimits]] lists some quantities that can be subject
|
| 83 |
+
to limitations and a potential minimum supported value for each
|
| 84 |
+
quantity.
|
| 85 |
+
|
| 86 |
+
A conforming implementation may use an implementation-defined version of
|
| 87 |
+
the Unicode Standard that is a later version than the one referenced in
|
| 88 |
+
[[intro.refs]].
|
| 89 |
|
| 90 |
A conforming implementation may have extensions (including additional
|
| 91 |
library functions), provided they do not alter the behavior of any
|
| 92 |
well-formed program. Implementations are required to diagnose programs
|
| 93 |
that use such extensions that are ill-formed according to this document.
|
| 94 |
Having done so, however, they can compile and execute such programs.
|
| 95 |
|
| 96 |
Each implementation shall include documentation that identifies all
|
| 97 |
conditionally-supported constructs that it does not support and defines
|
| 98 |
+
all locale-specific characteristics.[^3]
|
| 99 |
|