Skip to content

[intro.compliance.general], [using.headers] Redundant and inconsistent wording #7846

Open
@Eisenwave

Description

@Eisenwave

[intro.compliance.general] paragraph 5:

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]).

[using.headers] paragraph 1:

The entities in the C++ standard library are defined in headers, whose contents are made available to a translation unit when it contains the appropriate #include preprocessing directive ([cpp.include]) or the appropriate import declaration ([module.import]).

Problems

I think the intent here is that [intro.compliance] acts as a forward reference which lists possible ways to get standard library names, but it fails to mention import std ([std.modules]), so it is incomplete.

It is also weird that [intro.compliance] specifically mentions named header units, but [using.headers], which it references, keeps it somewhat vague with "appropriate import declaration". You would think that the [library] wording would contain more detailed wording, not less detailed.

Suggested solution

If we are keeping the paragraph in [intro.compliance], it should additionally mention [std.modules]. Furthermore,the wording in [using.headers] should mention "named header units" instead of "appropriate import declaration", which is needlessly vague.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions