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

2024-12-19


1239. Hexadecimal floating-point literals vs user-defined literals

Section: 5.13.9  [lex.ext]     Status: C++11     Submitter: Howard Hinnant     Date: 2011-01-28

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

5.11 [lex.name] paragraph 3 says,

In addition, some identifiers are reserved for use by C++ implementations and standard libraries (_N4140_.17.6.4.3.2 [global.names]) and shall not be used otherwise; no diagnostic is required.

There is no corresponding mention in 5.13.9 [lex.ext] of the restrictions on user-defined literal suffixes in 16.4.5.3.6 [usrlit.suffix]. Furthermore, considering the likelihood of adding hexadecimal floating-point literals, whose syntax overlaps that of user-defined literals except for that restriction, it would be a good idea to require a diagnostic for a violation of that rule.