[libcxx-commits] [libcxx] [libc++][ratio] Avoids accepting unrelated types. (PR #80491)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Feb 3 11:20:23 PST 2024
================
@@ -289,6 +289,9 @@ private:
static const intmax_t __gcd_n1_d2 = __static_gcd<_R1::num, _R2::den>::value;
static const intmax_t __gcd_d1_n2 = __static_gcd<_R1::den, _R2::num>::value;
+ static_assert(__is_ratio<_R1>::value, "[ratio.general]/2 requires R1 to be a specialication of the ratio template");
----------------
mordante wrote:
Thanks!
https://github.com/llvm/llvm-project/pull/80491
More information about the libcxx-commits
mailing list