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

2225. Unrealistic header inclusion checks required

Section: 16.4.3.2 [using.headers] Status: C++14 Submitter: Richard Smith Opened: 2012-12-18 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [using.headers].

View all issues with C++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]

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 shall include the header lexically before the first reference in that translation unit to any of the entities declared in that header. No diagnostic is required.