Skip to content

CWG3075 [cpp.import] Timing of import directive form matching not stated #767

@hubert-reinterpretcast

Description

@hubert-reinterpretcast

Full name of submitter (unless configured in github; will be published with the issue): Hubert Tong

Reference (section label): [cpp.import]

Link to reflector thread (if any): N/A

Issue description:

In https://wg21.link/cpp.import#2, we have:

The last form of pp-import is only considered if the first two forms did not match [ ... ].

This is less clear than it should be. The intent is that the forms are matched after macro replacement (thus making the header-name-tokens form more than just a trap for string-literal‌s that do not start with ").

Suggested resolution:

Re-order the sentence and insert:
The last form of pp-import does not have a point of macro import, and is only considered if, after macro replacement, the first two forms did not match, and does not have a point of macro import.

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