Movatterモバイル変換


[0]ホーム

URL:



This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++14 status.

2225. Unrealistic header inclusion checks required

Section: 16.4.3.2[using.headers]Status:C++14Submitter: Richard SmithOpened: 2012-12-18Last modified: 2025-10-15

Priority:Not Prioritized

View all otherissues in [using.headers].

View all issues withC++14 status.

Discussion:

16.4.3.2[using.headers]/3 says:

A translation unit shall include a header only outside of any external declaration or definition, and shall include the header lexically before the first reference in that translation unit to any of the entities declared in that header.

Per 4.1[intro.compliance]/1, programs which violate this rule are ill-formed, and a conforming implementation is required to produce a diagnostic. This does not seem to match reality. Presumably, this paragraph is missing a "no diagnostic is required".

[2013-03-15 Issues Teleconference]

Moved to Tentatively Ready.

[2013-04-20 Bristol]

[2025-10-15; related to LWG657(i)]

Proposed resolution:

This wording is relative to N3485.

  1. Edit 16.4.3.2[using.headers] p3 as indicated:

    -3- A translation unit shall include a header only outside of any external declaration or definition, and shallinclude the header lexically before the first reference in that translation unit to any of the entities declaredin that header.No diagnostic is required.


[8]ページ先頭

©2009-2026 Movatter.jp