cplusplus / cplusplus/draft

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

Open
#7,846 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P3-Other
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

[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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked [intro.compliance.general] paragraph 5 and [using.headers] paragraph 1, then read the referenced [std.modules] wording. Update the draft wording to mention std modules and named header units consistently, and verify that the cross-references remain accurate.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.