This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


2000. header-name outside #include directive

Section: 5.4  [lex.pptoken]     Status: CD4     Submitter: Richard Smith     Date: 2014-09-09

[Moved to DR at the October, 2015 meeting.]

The “max munch” rule could be read to require the characters <int> in vector<int> to be parsed as a header-name rather than as three distinct tokens. 5.8 [lex.header] paragraph 1 says,

Header name preprocessing tokens shall only appear within a #include preprocessing directive (15.3 [cpp.include]).

However, that is not sufficiently clear that header-names are only to be recognized in that context.

Proposed resolution (May, 2015):

  1. Change 5.4 [lex.pptoken] bullet 3.3 as follows:

  2. Change 5.8 [lex.header] paragraph 1 as follows:

  3. [Note: Header name preprocessing tokens shall only appear within a #include preprocessing directive (15.3 [cpp.include] see 5.4 [lex.pptoken]). end note] The sequences in both forms...