libstdc++: Simplify chrono::duration::_S_gcd
authorJonathan Wakely <jwakely@redhat.com>
Mon, 7 Sep 2020 19:09:17 +0000 (20:09 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 7 Sep 2020 19:09:17 +0000 (20:09 +0100)
commitec5096f48bbd7db83cbe94bdd3235c5808a5979a
tree479c47fbcac92b549d89601497e22148a71783f9
parent00ffe730072f5e2e1923692163dc37db7b3784cb
libstdc++: Simplify chrono::duration::_S_gcd

We can simplify this constexpr function further because we know that
period::num >= 1 and period::den >= 1 so only the remainder can ever be
zero.

libstdc++-v3/ChangeLog:

* include/std/chrono (duration::_S_gcd): Use invariant that
neither value is zero initially.
libstdc++-v3/include/std/chrono