C++ Logo

std-proposals

Advanced search

Re: C - Allow underscores in numberic constants

From: Ryan Nicholl <rnicholl_at_[hidden]>
Date: Thu, 05 Mar 2020 01:10:59 +0000
I believe that right now 123_456 applies user-defined literal operator""_456 to 123. This change would break backwards compatibility and is probably a non-starter.

-------- Original Message --------
On Mar 4, 2020, 20:05, Ryan Nicholl wrote:

> Doesn't this conflict with operator""?
>
> -------- Original Message --------
> On Mar 4, 2020, 19:28, J Decker via Std-Proposals wrote:
>
>> Allow '_' to be found in a number token, and ignored for generating the resulting token. Allow specifying numbers with underscores like 0x1234_5678; 123_534.000_003 ; can include trailing underscores, and just terminate on the next whitespace or operator...
>>
>> This is the proposal that was applied for ECMA Script
>> https://github.com/tc39/proposal-numeric-separator
>>
>> This is my Proposalhttps://gist.github.com/d3x0r/93f8da65f79de66a9736754fdfd99f54
>>
>> J

Received on 2020-03-04 19:13:47