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

2024-04-18


1723. Multicharacter user-defined character literals

Section: 5.13.9  [lex.ext]     Status: drafting     Submitter: Mike Miller     Date: 2013-07-31

According to 5.13.3 [lex.ccon] paragraph 1, a multicharacter literal like 'ab' is conditionally-supported and has type int.

According to 5.13.9 [lex.ext] paragraph 6,

If L is a user-defined-character-literal, let ch be the literal without its ud-suffix. S shall contain a literal operator (12.6 [over.literal]) whose only parameter has the type of ch and the literal L is treated as a call of the form

A user-defined-character-literal like 'ab'_foo would thus require a literal operator

However, that is not one of the signatures permitted by 12.6 [over.literal] paragraph 3.

Should multicharacter user-defined-character-literals be conditionally-supported? If so, 12.6 [over.literal] paragraph 3 should be adjusted accordingly. If not, a note in 5.13.9 [lex.ext] paragraph 6 saying explicitly that they are not supported would be helpful.