-
Notifications
You must be signed in to change notification settings - Fork 108
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
Unexpected behavior when deserializing to double #434
Comments
TL;DR you should never call >> if you are unsure the value is empty; use You cannot deserialize a val which does not exist, ie you cannot deserialize a null val. This is stated really early in the quickstart (and see also a sample for null values). As for the error, it is actually an assertion, and as stated in the README the default error handler calls Also, I guess you're using an older version; in the latest release there are some important error handling fixes; see the release notes for more info.
Please provide concrete examples; the alphabetic characters matter, and their position as well. Also, there was a fix in 0.6.0 that may be relevant for this problem; see #390 and #415. |
Thank you for the explanations and my bad I missed the part about using >> on empty values in the quick start.
After further testing I determined its a segmentation fault only when I deserialize to a double or float. Other data types tested lead to an abort. Regarding the second issue a small correction, it does not return zero but only the numbers before the letter(s). For example: Note: I am using the master branch of about a week ago (commit e432c2f) |
I've investigated this.
For an integer, the corresponding function would be either |
Deserializing to double using:
The following two cases behave unexpectedly:
The text was updated successfully, but these errors were encountered: