-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Floating point rounding #777
Copy link
Copy link
Closed
Labels
state: please discussplease discuss the issue or vote for your favorite optionplease discuss the issue or vote for your favorite optionstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
Description
I'll preface this by saying I know there's been some discussion about this already, and by saying that my version is not the latest, so this may already be fixed. Right now, you can do:
auto j = json::parse(R"({"x":1.5})");
int x = j.at("x");
With no complaint. Is this intentional? I thought that json checks to see if precision is lost before converting to an integer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
state: please discussplease discuss the issue or vote for your favorite optionplease discuss the issue or vote for your favorite optionstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated