[PATCH] D32309: [libcxx] [test] Resolve compiler warnings in LCM/GCD tests

Richard Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 21 14:35:34 PDT 2017


rsmith added inline comments.


================
Comment at: test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp:46
+        std::gcd(static_cast<Input2>(0), static_cast<Input1>(0)))>::value, "");
+    const bool result = static_cast<std::common_type_t<Input1, Input2>>(out) ==
+        std::gcd(static_cast<Input1>(in1), static_cast<Input2>(in2));
----------------
Is there a reason to recompute the type here rather than using `Output`?


https://reviews.llvm.org/D32309





More information about the cfe-commits mailing list