You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 1.2.2 YAML spec indicates octal literals should be formatted as "0o123" which is annoyingly not consistent with what C++ thinks octal strings should look like (0123).
The stringstream extraction currently used expects octals to have a single leading '0', not '0o'. This is used by yaml-cpp:
Which ultimately means "0o123" cannot be converted to an int. "0123" on the other hand can be converted to an int, which is maybe not the desired behavior if strictly adhering to the 1.2 spec.
Note this is true only as of YAML 1.2, version 1.1 specifies octals the opposite way 🙃.
Somewhat related to treatment of booleans: #1198
The text was updated successfully, but these errors were encountered:
I think you're right. Probably the right behavior is to add the 0o123 format but not remove the 0123 format, since the YAML schema is allowed to be extended, and 0123 is reasonable to parse as octal.
The 1.2.2 YAML spec indicates octal literals should be formatted as "0o123" which is annoyingly not consistent with what C++ thinks octal strings should look like (0123).
The stringstream extraction currently used expects octals to have a single leading '0', not '0o'. This is used by yaml-cpp:
yaml-cpp/include/yaml-cpp/node/convert.h
Lines 142 to 155 in eaf7205
Which ultimately means "0o123" cannot be converted to an int. "0123" on the other hand can be converted to an int, which is maybe not the desired behavior if strictly adhering to the 1.2 spec.
Note this is true only as of YAML 1.2, version 1.1 specifies octals the opposite way 🙃.
Somewhat related to treatment of booleans: #1198
The text was updated successfully, but these errors were encountered: