How to Apply Content Not Explicitly Cited from the Normative References to the C++ Standard

Can we apply content not explicitly cited from the normative references to the C++ standard?

The function of the Normative References section of an ISO standard document is defined in ISO/IEC Directives, Part 2, 2011 §6.2.2:

6.2.2 Normative references

This conditional element shall give a list of the referenced documents cited (see 6.6.7.5) in
the document in such a way as to make them indispensable for the application of the document. For dated references, each shall be given with its year of publication, or, in the case of enquiry or final drafts, with a dash together with a footnote “To be published.”, and full title. The year of publication or dash shall not be given for undated references. When an undated reference is to all parts of a document, the publication number shall be followed by the indication “(all parts)” and the general title of the series of parts (i.e. the introductory and main elements, see Annex E).

In principle, the referenced documents shall be documents published by ISO and/or IEC.
Documents published by other bodies may be referred to in a normative manner provided that

a) the referenced document is recognized by the ISO and/or IEC committee concerned as
having wide acceptance and authoritative status as well as being publicly available,

b) the ISO and/or IEC committee concerned has obtained the agreement of the authors or
publishers (where known) of the referenced document to its inclusion and to its being
made available as required — the authors or publishers will be expected to make
available such documents on request,

c) the authors or publishers (where known) have also agreed to inform the ISO and/or IEC
committee concerned of their intention to revise the referenced document and of the
points the revision will concern, and

d) the ISO and/or IEC committee concerned undertakes to review the situation in the light of
any changes in the referenced document.

The list shall be introduced by the following wording:

“The following documents, in whole or in part, are normatively referenced in this
document and are indispensable for its application. For dated references, only the edition
cited applies. For undated references, the latest edition of the referenced document
(including any amendments) applies.”


The above wording is also applicable to a part of a multipart document.

The list shall not include the following:

  • referenced documents which are not publicly available;

  • referenced documents which are only cited in an informative manner;

  • referenced documents which have merely served as bibliographic or background material in the preparation of the document.


Such referenced documents may be listed in a bibliography (see 6.4.2).

It notably does not say that the contents of the referenced documents are incorporated into the current document. Essentially it serves as a list of all the other standard documents that are in some way normatively referenced elsewhere in the document.

So not everything in, e.g., C99 is incorporated into C++11 - only those parts of C99 specifically referenced as being incorporated in the C++11 standard.

Relationship between C and C++ standard library

For the C standard library C++ falls back on the C standard and for C++11 it falls back on C99 not C11, before C++11 the C standard referenced was C90. This is covered in section 1.2 Normative references which says:

The following referenced documents are indispensable for the
application of this document. For dated references, only the edition
cited applies. For undated references, the latest edition of the
referenced document (including any amendments) applies.

and includes:

  • ISO/IEC 9899:1999, Programming languages — C

  • ISO/IEC 9899:1999/Cor.1:2001(E), Programming languages — C, Technical Corrigendum 1

  • ISO/IEC 9899:1999/Cor.2:2004(E), Programming languages — C, Technical Corrigendum 2

  • ISO/IEC 9899:1999/Cor.3:2007(E), Programming languages — C, Technical Corrigendum 3

and also says:

The library described in Clause 7 of ISO/IEC 9899:1999 and Clause 7 of
ISO/IEC 9899:1999/Cor.1:2001 and Clause 7 of ISO/IEC
9899:1999/Cor.2:2003 is hereinafter called the C standard library.1

The C++ standard uses the term C standard library to refer back to C99 and the TCs and will explicitly state when C++ differs from C.

and section 17.2 The C standard library says:

  1. The C++ standard library also makes available the facilities of the
    C standard library, suitably adjusted to ensure static type safety.
  2. The descriptions of many library functions rely on the C standard
    library for the signatures and semantics of those functions. In all
    such cases, any use of the restrict qualifier shall be omitted.

The cname header files which correspond to C Standard Library name.h files is covered in 17.6.1.2 Headers which says amongst other things:

Except as noted in Clauses 18 through 30 and Annex D, the contents of
each header cname shall be the same as that of the corresponding
header name.h, as specified in the C standard library (1.2) or the C
Unicode TR, as appropriate, as if by inclusion. In the C++ standard
library, however, the declarations (except for names which are defined
as macros in C) are within namespace scope (3.3.6) of the namespace
std. It is unspecified whether these names are first declared within
the global namespace scope and are then injected into namespace std by
explicit using-declarations (7.3.3)

The contents of climits as they relate to limits.h is covered in section 18.3.3 and says:

The contents are the same as the Standard C library header .
[ Note: The types of the constants defined by macros in are
not required to match the types to which the macros refer.—end note ]

Note, as I mentioned in the comment above, the normative references are not taken as a whole, the C++ standard must make explicit reference to a normative reference for it to apply to the C++ standard. See Can we apply content not explicitly cited from the normative references to the C++ standard? for more details.

Why are the documents from the C Standard working group password protected?

The drafts are password protected when they contain only the material that has been or will potentially be published as the ISO standard itself. Because C17 was basically a bugfix release (no new material) this was unfortunately the case for most of the development phase of C17.

But as soon as we switched to "C2x mode" the drafts are open. The first of these, N2310, is still pretty close to C17, so this could be a good base to work with. (And maybe this will draw more attention to the ongoing work on C2x, enroll in your national standards body to participate!)

Whether or not this "belongs in the public domain" is certainly a matter of debade. ISO doesn't work like this, unfortunately, and there is not much that anybody can do. At this time, having their special international status, they own the copyright of the standard itself. But they do not own the work surrounding it, the papers that people present etc, so anybody who contributes might still get their credits.

Are notes and examples in the core language specification of the C++ Standard non-normative?

See §6.5 of the ISO/IEC Directives Part 2. Notes, examples, and footnotes are all considered "informational", as opposed to "normative".

For notes and examples:

Notes and examples integrated in the text of a document shall only be used for giving
additional information intended to assist the understanding or use of the document. They shall
not contain requirements ("shall"; see 3.3.1 and Table H.1) or any information considered
indispensable for the use of the document, e.g. instructions (imperative; see Table H.1),
recommendations ("should"; see 3.3.2 and Table H.2) or permission ("may"; see Table H.3).
Notes may be written as a statement of fact.

For footnotes:

Footnotes to the text give additional information; their use shall be kept to a minimum. As is
the case for notes and examples integrated in the text (see 6.5.1) footnotes shall not contain
requirements or any information considered indispensable for the use of the document.

However, note that footnotes to figures and tables can contain requirements.

Sikuli automated test enviroment

RaiMan from SikuliX:

No standards apply at all - OpenSource as private hobby.
Use as is ;-)

Which section in the C++11 standard dictates the relative ordering between the sizes of primitive data types?

In n3337, the section is 3.9.1, [basic.fundamental]/2, second paragraph (emphasis is mine):

There are five standard signed integer types : “signed char”, “short int”, “int”, “long int”, and “long long int”. In this list, each type provides at least as much storage as those preceding it in the list. There may also be implementation-defined extended signed integer types. The standard and extended signed integer types are collectively called signed integer types. Plain ints have the natural size suggested by the architecture of the execution environment44; the other signed integer types are provided to meet special needs.


Note that 5.2.4.2/1 in the C standard only defines the minimum range for each integer type, it does not enforce the ordering — I could have int from -32767 to 32767 and short from -2147483647 to 2147483647 and still be conforming for this section.

However 6.2.5.8 is much more explicit:

For any two integer types with the same signedness and different integer conversion rank (see 6.3.1.1), the range of values of the type with smaller integer conversion rank is a subrange of the values of the other type.

And 6.3.1.1 tells you that:

The rank of long long int shall be greater than the rank of long int, which shall be greater than the rank of int, which shall be greater than the rank of short int, which shall be greater than the rank of signed char.

Does C++, as an abstraction, support bits representing one of more than two values?

3.9.1.7 says

Types bool, char, wchar_t, and the signed and unsigned integer types
are collectively called integral types.48) A synonym for integral type
is integer type. The representations of integral types shall define
values by use of a pure binary numeration system.49) [ Example: this
International Standard permits 2’s complement, 1’s complement and
signed magnitude representations for integral types. — end example ]"

The note 49 reads

A positional representation for integers that uses the binary digits 0
and 1, in which the values represented by successive bits are
additive, begin with 1, and are multiplied by successive integral
power of 2, except perhaps for the bit with the highest position.
(Adapted from the American National Dictionary for Information
Processing Systems.)

Does C++, as an abstraction, support bits representing one of more than two values?

3.9.1.7 says

Types bool, char, wchar_t, and the signed and unsigned integer types
are collectively called integral types.48) A synonym for integral type
is integer type. The representations of integral types shall define
values by use of a pure binary numeration system.49) [ Example: this
International Standard permits 2’s complement, 1’s complement and
signed magnitude representations for integral types. — end example ]"

The note 49 reads

A positional representation for integers that uses the binary digits 0
and 1, in which the values represented by successive bits are
additive, begin with 1, and are multiplied by successive integral
power of 2, except perhaps for the bit with the highest position.
(Adapted from the American National Dictionary for Information
Processing Systems.)



Related Topics



Leave a reply



Submit