[PATCH] D32309: [libcxx] [test] Resolve compiler warnings in LCM/GCD tests
Billy Robert O'Neal III via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 22 12:15:52 PDT 2017
BillyONeal 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));
----------------
rsmith wrote:
> Is there a reason to recompute the type here rather than using `Output`?
Hmm... I think I was concerned about it looking like the cast o the output type was an assertion that the return type was in fact of that type (which isn't true). But that should be taken care of by the previous static_asserts.
https://reviews.llvm.org/D32309
More information about the cfe-commits
mailing list