Skip to content

[lex.phases] p2 Any Splice's deleting is firstly taken place CWG2747 #4903

@xmh0511

Description

@xmh0511

[lex.phases] p2

Each sequence of a backslash character () immediately followed by zero or more whitespace characters other than new-line followed by a new-line character is deleted, splicing physical source lines to form logical source lines. Only the last backslash on any physical source line shall be eligible for being part of such a splice. Except for splices reverted in a raw string literal, if a splice results in a character sequence that matches the syntax of a universal-character-name, the behavior is undefined. A source file that is not empty and that does not end in a new-line character, or that ends in a splice, shall be processed as if an additional new-line character were appended to the file.

"splice" is newly introduced by p2223r2. Presumably, it refers to any sequence of a backslash character ( \ ) immediately followed by zero or more whitespace characters other than new-line followed by a new-line character? However, as the above rule specified, any such sequence is deleted firstly, which takes place prior to the emphasized part. Should we say

A source file that is not empty and that does not end in a new-line character, or that ends in a splice before any such splicing takes place, shall be processed as if an additional new-line character were appended to the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cwgIssue must be reviewed by CWG.not-editorialIssue is not deemed editorial; the editorial issue is kept open for tracking.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions