constexpr TimeDelta::operator/
The mul/div operators are tricky. operator/ works when |a| is small enough (in absolute value) to deterministically not risk overflow. operator*() on the other hand doesn't because of a limitation in __builtin_mul_overflow. We could do some template hacking to make operator*(a) == operator/(1.0/a) when |a| is a constant expression. Bug: 761570 Change-Id: I9906edfc049017ad19872e4a586b2ec675404850 Reviewed-on: https://chromium-review.googlesource.com/886344Reviewed-by:Daniel Cheng <dcheng@chromium.org> Reviewed-by:
Yuri Wiitala <miu@chromium.org> Commit-Queue: Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#532947}
Showing
Please register or sign in to comment