C++ Logo


Advanced search

Subject: Re: [std-proposals] C - Allow underscores in numberic constants
From: Barry Revzin (barry.revzin_at_[hidden])
Date: 2020-03-04 21:43:53

On Wed, Mar 4, 2020 at 6:28 PM J Decker via Std-Proposals <
std-proposals_at_[hidden]> 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 Proposal
> https://gist.github.com/d3x0r/93f8da65f79de66a9736754fdfd99f54
> J

In case anyone is curious, the original digit separators proposal did use
A subsequent draft included a whole bunch of different options:
Before going back to underscore:
and finally the single quote we've had since C++14:


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

Standard Proposals Archives on Google Groups