Title
Stringizing raw string literals containing newline
Status
drafting
Section
15.6.3 [cpp.stringize]
Submitter
David Krauss

Created on 2013-07-01.00:00:00 last changed 136 months ago

Messages

Date: 2013-07-01.00:00:00

Stringizing a raw string literal containing a newline produces an invalid (unterminated) string literal and hence results in undefined behavior. It should be specified that a newline in a string literal is transformed to the two characters '\' 'n' in the resulting string literal.

A slightly related case involves stringizing a bare backslash character: because backslashes are only escaped within a string or character literal, a stringized bare backslash becomes "\", which is invalid and hence results in undefined behavior.

History
Date User Action Args
2013-10-14 00:00:00adminsetstatus: open -> drafting
2013-07-01 00:00:00admincreate