r/cpp • {fmt} • Dec 02 '19

{fmt} 6.1 released with improved floating-point formatting, locale support, faster compile times and more

https://github.com/fmtlib/fmt/releases/tag/6.1.0
212 Upvotes

34 comments sorted by

View all comments

Show parent comments

9

u/[deleted] Dec 02 '19

[removed] — view removed comment

8

u/[deleted] Dec 02 '19

fun fact, all zero literals are octal as they start with zero

-2

u/[deleted] Dec 03 '19

[removed] — view removed comment

1

u/mujjingun Dec 03 '19

no, 0+6 is decimal 6 because octal 0 + decimal 6 = decimal 6.

0

u/[deleted] Dec 03 '19

[removed] — view removed comment

5

u/mujjingun Dec 03 '19

There is no rule. Once the numbers get interpreted as a certain base, there is no base anymore, they are just numbers. Octal 0 = zero, decimal 6 = six. zero plus six = six.