C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] C - Allow underscores in numberic constants
From: Ryan Nicholl (rnicholl_at_[hidden])
Date: 2020-03-04 19:10:59


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



STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups