Fix ratio arithmetic with zero
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@143519 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -90,6 +90,12 @@ struct __static_gcd<_Xp, 0>
|
||||
static const intmax_t value = _Xp;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct __static_gcd<0, 0>
|
||||
{
|
||||
static const intmax_t value = 1;
|
||||
};
|
||||
|
||||
// __static_lcm
|
||||
|
||||
template <intmax_t _Xp, intmax_t _Yp>
|
||||
|
Reference in New Issue
Block a user