-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Digit separator doesn't parse with opening brace #881
Conversation
Note that keeping Cpp1 apostrophe as digit separator caused this parsing complication. Personally I think underscore reads much nicer (and is used in many other languages) and wouldn't need special tracking here. |
The last point of #289 (comment) also addresses a comment about using something other than |
@ntrel It's possible that underscore would conflict with user defined literals. |
Not really. |
This is a valid UDL. https://www.godbolt.org/z/sn8r9a3zv https://www.godbolt.org/z/PvnK3jvMj
|
Now that there is no comma operator, could comma be used instead?
On 8 December 2023 16:55:28 gregmarr ***@***.***> wrote:
@ntrel<https://github.com/ntrel> It's possible that underscore would conflict with user defined literals.
—
Reply to this email directly, view it on GitHub<#881 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AALUZQNDERFHIXPFZDDJCOTYINA75AVCNFSM6AAAAABAMZ5ODSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGUZDCNJUGI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
No. |
Oof, yeah how could I have missed such a blatant ambiguity...
On 8 December 2023 17:42:28 Johel Ernesto Guerrero Peña ***@***.***> wrote:
No.
For ambiguities, see https://www.reddit.com/r/cpp/comments/18canwt/small_rant_the_comma_operator_is_one_of_the_worst/.
One example is f(1,2).
Is that 12, or 1 and 2?
—
Reply to this email directly, view it on GitHub<#881 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AALUZQKCACPZWDHGEOGQ2BLYINGQFAVCNFSM6AAAAABAMZ5ODSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGU3TSNRZGY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
This comment was marked as duplicate.
This comment was marked as duplicate.
Thanks for this! I appreciate the PR, but I ended up fixing it a different way (using a shortcut to try not to duplicate as much of numeric literal parsing during brace matching, but if we discover problems with that we can look at this PR again). Again, thanks very much. |
Fixes #862.