Why is this not ill-formed in string literal concatenation?

Viewed 111

In translation phase 6 (5.2), adjacent string-literals are concatenated. If both string-literals have the same encoding-prefix, the resulting concatenated string literal has that encoding-prefix. If one string-literal has no encoding-prefix, it is treated as a string-literal of the same encoding-prefix as the other operand. If a UTF-8 string literal token is adjacent to a wide string literal token, the program is ill-formed. Any other concatenations are conditionally-supported with implementation-defined behavior. [Note: This concatenation is an interpretation, not a conversion. Because the interpretation happens in translation phase 6 (after each character from a string literal has been translated into a value from the appropriate character set), a string-literal’s initial rawness has no effect on the interpretation or well-formedness of the concatenation. —end note]

So with special regards to the note in this quote: If the interpretation happens after each character has been translated in a value, why is then not also the concatenation of a wide string literal and UTF-8 also implementation defined and conditionally supported?

source: http://www.open-std.org/jtc1/sc22/wg21/docs/standards (2020 edition)

0 Answers
Related