2 ms·
That also works in Perl, Ruby, C#, ADA, D, and Julia. According to Wikipedia [1] underscore was proposed for C++ but rejected because it conflicts with user-de
by tzs 11y ago
That also works in Perl, Ruby, C#, ADA, D, and Julia.
According to Wikipedia [1] underscore was proposed for C++ but rejected because it conflicts with user-defined literals.
Is there any reason they could not have used space? Offhand, I can't think of anyplace where a space in a literal number would not currently be illegal, so adding that as a separator should not introduce any problems, but C++ has grown massively in complexity since I last seriously used it so I could easily have overlooked something.
[1] https://en.m.wikipedia.org/wiki/Integer_literal#Digit_separators https://en.m.wikipedia.org/wiki/Integer_literal#Digit_separa...
- pklausler 11y agoA space could not be allowed in numeric values in runtime input (fscanf, <<).