C++ Logo

std-proposals

Advanced search

Re: C - Allow underscores in numberic constants

From: J Decker <d3ck0r_at_[hidden]>
Date: Wed, 4 Mar 2020 19:38:08 -0800
On Wed, Mar 4, 2020 at 5:11 PM Ryan Nicholl via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> 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.
>
>
> Okay, I didn't consult this standard first I see. I thought the trailing
thing might have to be text like _farards (which would just preclude
trailing _ )


>
>
>
>
> -------- Original Message --------
> On Mar 4, 2020, 20:05, Ryan Nicholl < rnicholl_at_[hidden]> wrote:
>
>
> Doesn't this conflict with operator""?
>
>
>
>
>
>
> -------- Original Message --------
> On Mar 4, 2020, 19:28, 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
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
>

Received on 2020-03-04 21:41:04