Movatterモバイル変換


[0]ホーム

URL:


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

2025-12-20


2870. Combining absentencoding-prefixes

Section:5.13.5  [lex.string]    Status:CD7    Submitter:Jan Schultke    Date:2024-03-09

[Accepted as a DR at the June, 2024 meeting.]

(From submission#511.)

Subclause 5.13.5 [lex.string] paragraph 7 does not properlyhandle the case where bothencoding-prefixes are absent:

The commonencoding-prefix for a sequence ofadjacentstring-literals is determined pairwise as follows: Iftwostring-literals have the sameencoding-prefix , thecommonencoding-prefix is thatencoding-prefix . Ifonestring-literal has noencoding-prefix , thecommonencoding-prefix is that of theotherstring-literal. Any other combinations are ill-formed.

Possible resolution [SUPERSEDED]:

Change in 5.13.5 [lex.string] paragraph 7 as follows:

The commonencoding-prefix for a sequence ofadjacentstring-literals is determined pairwise asfollows:If twostring-literals have the sameencoding-prefix, the commonencoding-prefix is thatencoding-prefix. If onestring-literal has noencoding-prefix, the commonencoding-prefix is that ofthe otherstring-literalor is absent if the otherstring-literal has noencoding-prefix. Otherwise,bothstring-literals shall have the sameencoding-prefix, and the commonencoding-prefix is thatencoding-prefix.Any other combinations areill-formed.

CWG 2024-05-03

CWG preferred a holistic instead of a pairwise approach.

Proposed resolution (approved by CWG 2024-05-17):

Change in 5.13.5 [lex.string] paragraph 7 as follows:

The commonencoding-prefix for a sequence ofadjacentstring-literals is determined pairwise as follows: Iftwostring-literals have the sameencoding-prefix , thecommonencoding-prefix is thatencoding-prefix . Ifonestring-literal has noencoding-prefix , thecommonencoding-prefix is that of theotherstring-literal. Any other combinations are ill-formed.

Thestring-literals in any sequence ofadjacentstring-literals shall have at most oneuniqueencoding-prefix among them. The commonencoding-prefix of the sequence is thatencoding-prefix,if any.




[8]ページ先頭

©2009-2026 Movatter.jp