Skip to content
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

csv::set_decimal_places does not round decimals to width #182

Closed
telmo-carmo opened this issue Aug 27, 2021 · 1 comment
Closed

csv::set_decimal_places does not round decimals to width #182

telmo-carmo opened this issue Aug 27, 2021 · 1 comment

Comments

@telmo-carmo
Copy link

csv::set_decimal_places(2);
writer << std::make_tuple(-1.043, 2.126, "Three"); // out => -1.04;2.12;Three

@vincentlaucsb
Copy link
Owner

Closing as this is the intended behavior. It is the user's responsibility to call std::round() on CSV writer inputs. I do not believe all users should be saddled with the cost of calling std::round on all floating point inputs.

@vincentlaucsb vincentlaucsb reopened this May 20, 2024
@vincentlaucsb vincentlaucsb closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants