The set of
diagnosable rules
consists of all syntactic and semantic rules in this document
except for those rules containing an explicit notation that
“no diagnostic is required” or which are described as resulting in
“undefined behavior”.
Although this document states only requirements on C++
implementations, those requirements are often easier to understand if
they are phrased as requirements on programs, parts of programs, or
execution of programs.
If a program contains no violations of the rules in
[lex] through [thread] and [depr],
a conforming implementation shall,
within its resource limits as described in [implimits],
accept and correctly execute3
that program.
If a program contains a violation of a rule for which no diagnostic is required,
this document places no requirement on implementations
with respect to that program.
Otherwise, if a program contains a violation of any diagnosable rule or an occurrence
of a construct described in this document as “conditionally-supported” when
the implementation does not support that construct, a conforming implementation
shall issue at least one diagnostic message.
During template argument deduction and substitution,
certain constructs that in other contexts require a diagnostic
are treated differently;
see [temp.deduct].
shall issue at least one diagnostic message for
each #warning or #error preprocessing directive
not following a #error preprocessing directive in
a preprocessing translation unit, and
For classes and class templates, the library Clauses specify partial
definitions.
Private members are not
specified, but each implementation shall supply them to complete the
definitions according to the description in the library Clauses.
A C++ translation unit ([lex.phases])
obtains access to the names defined in the library by
including the appropriate standard library header or importing
the appropriate standard library named header unit ([using.headers]).
The templates, classes, functions, and objects in the library have
external linkage.
The implementation provides
definitions for standard library entities, as necessary, while combining
translation units to form a complete C++ program ([lex.phases]).
A freestanding
implementation is one in which execution may take place without the benefit of
an operating system.
A hosted implementation
supports all the facilities described in this document, while
a freestanding implementation
supports the entire C++ language
described in [lex] through [cpp] and
the subset of the library facilities described in [compliance].
A conforming implementation may have extensions (including
additional library functions), provided they do not alter the
behavior of any well-formed program.
Implementations are required to diagnose programs that use such
extensions that are ill-formed according to this document.
Having done so, however, they can compile and execute such programs.
Each implementation shall include documentation that identifies all
conditionally-supported constructs
that it does not support and defines all locale-specific characteristics.4