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

<chrono>: Handle overflow cases in [time.format] #1902

Open
mnatsuhara opened this issue May 4, 2021 · 0 comments
Open

<chrono>: Handle overflow cases in [time.format] #1902

mnatsuhara opened this issue May 4, 2021 · 0 comments
Labels
bug Something isn't working chrono C++20 chrono

Comments

@mnatsuhara
Copy link
Contributor

Observed by @statementreply.

There are two specific cases of overflow that we are not currently handling correctly:

> format("{:%Q%q}", nanoseconds::min())
< --9223372036854775808ns
> format("{:%T}", duration<float, ratio<1, 10'000'000>>{179999981568.0f})
< 05:00:00.-016384

We should also audit for other cases of overflow.

Discovered while implementing #12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chrono C++20 chrono
Projects
None yet
Development

No branches or pull requests

1 participant